Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
- Fix tg link incase bot should download from public channel

Signed-off-by: anasty17 <[email protected]>
  • Loading branch information
anasty17 committed May 10, 2023
1 parent f4f405e commit 28ad143
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is a Telegram Bot written in Python for mirroring files on the Internet to your Google Drive or Telegram. Based on [python-aria-mirror-bot](https://github.com/lzzy12/python-aria-mirror-bot)
This is a Telegram Bot written in Python for mirroring files on the Internet to your Google Drive, Telegram or to any rclone supported cloud. Based on [python-aria-mirror-bot](https://github.com/lzzy12/python-aria-mirror-bot)

# Features

Expand Down Expand Up @@ -39,7 +39,7 @@ In each single file there is a major change from base code, it's almost totaly d

### Google

- Stop duplicates for all tasks except yt-dlp tasks
- Stop duplicates for all tasks
- Download from Google Drive
- Counting Google Drive files/folders
- Search in multiple Drive folder/TeamDrive
Expand Down Expand Up @@ -102,7 +102,7 @@ In each single file there is a major change from base code, it's almost totaly d

### Rclone

- Download and Upload using rclone with and without service accounts
- Download and Upload using rclone with and without random service accounts
- Ability to choose config, remote and path from list with buttons
- Ability to set rclone flags for each task or globally from config
- Rclone.conf for each user
Expand Down
5 changes: 1 addition & 4 deletions bot/helper/telegram_helper/message_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ async def get_tg_link_content(link):
msg_id = int(msg.group(2))
if chat.isdigit():
chat = int(chat) if private else int(f'-100{chat}')
superChat = True
else:
superChat = False

if private:
if not user:
Expand All @@ -112,7 +109,7 @@ async def get_tg_link_content(link):
return message, True
else:
raise Exception("You Don't have access to this message!")
elif superChat and (message := await bot.get_messages(chat_id=chat, message_ids=msg_id)) and message.chat:
elif (message := await bot.get_messages(chat_id=chat, message_ids=msg_id)) and message.chat:
return message, False
elif user and (message := await user.get_messages(chat_id=chat, message_ids=msg_id)) and message.chat:
message = await user.get_messages(chat_id=chat, message_ids=msg_id)
Expand Down

0 comments on commit 28ad143

Please sign in to comment.