mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Do not copy empty messages
This commit is contained in:
parent
70efffa896
commit
eed331b1b1
1 changed files with 3 additions and 0 deletions
|
|
@ -2902,6 +2902,9 @@ class Message(Object, Update):
|
|||
elif self.game and not await self._client.storage.is_bot():
|
||||
log.warning(f"Users cannot send messages with Game media type. "
|
||||
f"chat_id: {self.chat.id}, message_id: {self.message_id}")
|
||||
elif self.empty:
|
||||
log.warning(f"Empty messages cannot be copied. "
|
||||
f"chat_id: {self.chat.id}, message_id: {self.message_id}")
|
||||
elif self.text:
|
||||
return await self._client.send_message(
|
||||
chat_id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue