⬆️ better patched message.copy() method

This commit is contained in:
Tijuana Wisozk 2023-11-14 21:49:50 +08:00 committed by GitHub
parent db2f11ca9a
commit 08542df723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -404,19 +404,21 @@ class Message(pyrogram.types.Message):
"pyrogram.types.ReplyKeyboardRemove",
"pyrogram.types.ForceReply",
] = object,
**kwargs
) -> Union["pyrogram.types.Message", List["pyrogram.types.Message"]]:
if self.media:
self.text = None
return await self.oldcopy(
chat_id,
caption,
parse_mode,
caption_entities,
disable_notification,
reply_to_message_id,
schedule_date,
protect_content,
reply_markup,
chat_id=chat_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
disable_notification=disable_notification,
reply_to_message_id=reply_to_message_id,
schedule_date=schedule_date,
protect_content=protect_content,
reply_markup=reply_markup,
**kwargs
) # noqa