Skip to content

Commit

Permalink
make methode async
Browse files Browse the repository at this point in the history
Signed-off-by: tomyprs <[email protected]>
  • Loading branch information
troublescope committed Jun 29, 2023
1 parent 27135f0 commit 30c8853
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion caligo/modules/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ async def cmd_download(self, ctx: command.Context) -> str:

# Check if media is group or not
if ctx.input:
chat_id, msg_id = util.tg.parse_telegram_link(ctx.input)
chat_id, msg_id = await util.tg.parse_telegram_link(ctx.input)
else:
chat_id = ctx.chat.id
msg_id = reply_msg.id
Expand Down
2 changes: 1 addition & 1 deletion caligo/util/tg.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async def send_as_document(
caption="❯ ```" + caption + "```",
)

def parse_telegram_link(link):
async def parse_telegram_link(link):
# Pattern for extracting chat_id and msg_id
pattern = r'https?://t.me/(?:c/)?([a-zA-Z0-9_]+)/(\d+)'

Expand Down

0 comments on commit 30c8853

Please sign in to comment.