Skip to content

Commit

Permalink
Push from local
Browse files Browse the repository at this point in the history
  • Loading branch information
New-dev0 committed Dec 11, 2023
1 parent 8bb238c commit e33617c
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 6 deletions.
2 changes: 2 additions & 0 deletions core/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class GitError(Exception):
...

class Repo:
"""A wrapper class around git commandline"""

def __init__(self, path: str = ".") -> None:
self._path = path

Expand Down
31 changes: 31 additions & 0 deletions modules/basic/admins.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,37 @@
# PLease read the GNU Affero General Public License in
# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.

"""
✘ Commands Available -
• `.promote <reply to user/userid/username>`
• `.demote`
Promote/Demote the user in the chat.
• `.ban <reply to user/userid/username> <reason>`
• `.unban`\n Ban/Unban the user from the chat.
• `.kick <reply to user/userid/username> <reason>`
Kick the user from the chat.
• `.pin <reply to message>`
Pin the message in the chat
• `.tpin <time> <temp pin message>`
• `.unpin (all) <reply to message>`
Unpin the messages in the chat.
• `.pinned`\n Get pinned message in the current chat.
• `.listpinned`\n Get all pinned messages in current chat
• `.autodelete <24h/7d/1m/off>`
Enable Auto Delete Messages in Chat.
• `.purge <reply to message>`
Purge all messages from the replied message.
• `.purgeme <reply to message>`
Purge Only your messages from the replied message.
• `.purgeall`\n Delete all msgs of replied user.
"""

from telethon.errors import BadRequestError
from telethon.errors.rpcerrorlist import UserIdInvalidError
Expand Down
2 changes: 1 addition & 1 deletion modules/basic/mediainfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def mediainfo_cmd(event):
except Exception:
LOGS.exception(er)
return
await e.edit(f"{extra}[{get_string('mdi_1')}]({urll})", link_preview=False)
await event.edit(f"{extra}[{get_string('mdi_1')}]({urll})", link_preview=False)
if not match:
os.remove(naam)
if thumb and thumb != naam:
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Important Requirements here.

requests
# https://github.com/TeamUltroid/Telethon/archive/ultroid.zip
telethon
https://github.com/TeamUltroid/Telethon/archive/ultroid.zip
# telethon
python-decouple
telethon-patch
tgcrypto
Expand Down
6 changes: 3 additions & 3 deletions utilities/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def mediainfo(message: Message) -> str:
for k in message.document.attributes
):
_i = "sticker"
return _i + " as document"
return f"{_i} as document"
return _
return ""

Expand All @@ -273,9 +273,9 @@ def time_with_fixed_format(years, months, weeks, days, hours, minutes, seconds):
+ ((f"{minutes}:") if minutes else "00:")
+ ((f"{seconds}") if seconds else "00")
)
_ = re.search("(\d+:\d+:\d+)", tmp).group(0)
_ = re.search("(\d+:\d+:\d+)", tmp)[0]
_tmp = ":".join(
str(k).zfill(2) for k in re.search("(\d+:\d+:\d+)", tmp).group(0).split(":")
str(k).zfill(2) for k in re.search("(\d+:\d+:\d+)", tmp)[0].split(":")
)
return re.sub(_, _tmp, tmp)

Expand Down

0 comments on commit e33617c

Please sign in to comment.