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 17, 2024
1 parent 812fb0b commit 6b714ba
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions bot/helper/mirror_leech_utils/telegram_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,20 +453,14 @@ async def _upload_photo(self, cap_mono, thumb):
await self._copy_message(m, cap_mono)

async def _copy_message(self, m, cap_mono):
msg = await bot.get_messages(self._listener.upDest, m.id)
try:
await bot.copy_message(
self._user_id, self._listener.upDest, m.id, cap_mono
)
await msg.copy(self._user_id, caption=cap_mono)
except Exception as e:
LOGGER.error(e, f"id {m.id}")
LOGGER.error(e)
if self._user_dump:
try:
await bot.copy_message(
self._user_dump,
self._listener.upDest,
m.id,
cap_mono,
)
await msg.copy(self._user_dump, caption=cap_mono)
except Exception as e:
LOGGER.error(e)

Expand Down

0 comments on commit 6b714ba

Please sign in to comment.