Skip to content

Commit

Permalink
update telegram_uploader.py
Browse files Browse the repository at this point in the history
  • Loading branch information
5hojib committed Sep 21, 2024
1 parent 597fe7d commit 9c4b495
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bot/helper/mirror_leech_utils/telegram_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,10 @@ async def _upload_photo(self, cap_mono, thumb):
await self._copy_message()

async def _copy_message(self):
await sleep(2)
msg = await bot.get_messages(self._listener.upDest, self._sent_msg.id)

async def _copy(target, retries=2):
async def _copy(target, retries=3):
for attempt in range(retries):
try:
msg = await bot.get_messages(self._listener.upDest, self._sent_msg.id)
await msg.copy(target)
return
except Exception as e:
Expand Down

0 comments on commit 9c4b495

Please sign in to comment.