From 08542df7234df8668f609c4de606c353b7a275c3 Mon Sep 17 00:00:00 2001 From: Tijuana Wisozk <141935176+tcsnmm09480@users.noreply.github.com> Date: Tue, 14 Nov 2023 21:49:50 +0800 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20better=20patched=20message?= =?UTF-8?q?.copy()=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyromod/listen/listen.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pyromod/listen/listen.py b/pyromod/listen/listen.py index 9d96304..9094c41 100644 --- a/pyromod/listen/listen.py +++ b/pyromod/listen/listen.py @@ -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