Skip to content

Commit

Permalink
Merge pull request #23 from SoloLeveling7seven/main
Browse files Browse the repository at this point in the history
Updating Pyrogram Version & Progress
  • Loading branch information
soheru authored Jun 18, 2023
2 parents ecf2b01 + 11037ed commit 5cd5b90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions Bot/utils/progress_pyro.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import time, math, asyncio
from Bot import encoder,LOG
from pyrogram.enums import ParseMode
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message, User

PROGRESS = """
• {0} of {1}
Expand Down Expand Up @@ -28,14 +31,15 @@ async def progress_for_pyrogram(current, total, ud_type, message, start):
estimated_total_time if estimated_total_time != '' else "Calculating"
)
try:
await message.edit_text(
await encoder.edit_message_text(chat_id=message.chat.id,message_id=message.id,
text="{}\n{}".format(
ud_type,
tmp
),
parse_mode='markdown'
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("Owner", url = 'https://t.me/sohailkhan_indianime')]]) #instead of reply_markup u can use parse_mode=ParseMode.MARKDOWN
)
except:
except Exception as e:
LOG.error(f'Senpai Error: {e}')
pass
await asyncio.sleep(5)

Expand All @@ -62,7 +66,3 @@ def TimeFormatter(seconds: float) -> str:
((str(minutes) + "m, ") if minutes else "") + \
((str(seconds) + "s, ") if seconds else "")
return tmp[:-2]




2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pyrogram==1.4.16
pyrogram==2.0.106
tgcrypto
pymongo
ethon==0.1.2
Expand Down

0 comments on commit 5cd5b90

Please sign in to comment.