Skip to content

Commit

Permalink
fixed as_copy error (UsergeTeam#236)
Browse files Browse the repository at this point in the history
* fixed as_copy error

* Update channel_logger.py

Co-authored-by: rking32 <[email protected]>
  • Loading branch information
Krishna-Singhal and rking32 authored Jan 11, 2021
1 parent 3c5426c commit 917825d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions userge/core/types/new/channel_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,10 @@ async def fwd_msg(self,
if message.media:
asyncio.get_event_loop().create_task(self.log("**Forwarding Message...**", name))
try:
# pylint: disable=protected-access
if as_copy:
await message._client.copy_messages(chat_id=self._id,
from_chat_id=message.chat.id,
message_id=message.message_id)
await message.copy(chat_id=self._id)
else:
await message._client.forward_messages(chat_id=self._id,
from_chat_id=message.chat.id,
message_ids=message.message_id)
await message.forward(chat_id=self._id)
except ValueError:
pass
else:
Expand Down

0 comments on commit 917825d

Please sign in to comment.