From d984ae24d5d878276c23fc44ae94005d1b504af3 Mon Sep 17 00:00:00 2001 From: leonardotty <81367045+leonardotty@users.noreply.github.com> Date: Sat, 14 May 2022 19:28:44 +0200 Subject: [PATCH] Add missing parameter to send_reaction (#993) --- pyrogram/methods/messages/send_reaction.py | 10 ++++++++-- pyrogram/types/messages_and_media/message.py | 9 +++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pyrogram/methods/messages/send_reaction.py b/pyrogram/methods/messages/send_reaction.py index 7f597cb6..1ede4ead 100644 --- a/pyrogram/methods/messages/send_reaction.py +++ b/pyrogram/methods/messages/send_reaction.py @@ -27,7 +27,8 @@ class SendReaction: self: "pyrogram.Client", chat_id: Union[int, str], message_id: int, - emoji: str = "" + emoji: str = "", + big: bool = False ) -> bool: """Send a reaction to a message. @@ -41,6 +42,10 @@ class SendReaction: emoji (``str``, *optional*): Reaction emoji. Pass "" as emoji (default) to retract the reaction. + + big (``bool``, *optional*): + Pass True to show a bigger and longer reaction. + Defaults to False. Returns: ``bool``: On success, True is returned. @@ -58,7 +63,8 @@ class SendReaction: raw.functions.messages.SendReaction( peer=await self.resolve_peer(chat_id), msg_id=message_id, - reaction=emoji + reaction=emoji, + big=big ) ) diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index ab5e202f..f7429702 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -3310,7 +3310,7 @@ class Message(Object, Update): else: await self.reply(button, quote=quote) - async def react(self, emoji: str = "") -> bool: + async def react(self, emoji: str = "", big: bool = False) -> bool: """Bound method *react* of :obj:`~pyrogram.types.Message`. Use as a shortcut for: @@ -3332,6 +3332,10 @@ class Message(Object, Update): emoji (``str``, *optional*): Reaction emoji. Pass "" as emoji (default) to retract the reaction. + + big (``bool``, *optional*): + Pass True to show a bigger and longer reaction. + Defaults to False. Returns: ``bool``: On success, True is returned. @@ -3343,7 +3347,8 @@ class Message(Object, Update): return await self._client.send_reaction( chat_id=self.chat.id, message_id=self.id, - emoji=emoji + emoji=emoji, + big=big ) async def retract_vote(