Visitar URL original
Add missing parameter to send_reaction (#993) · pyrogram/pyrogram@d984ae2 · GitHub
Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Commit d984ae2

Browse files
authored
Add missing parameter to send_reaction (#993)
1 parent 050a730 commit d984ae2

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

‎pyrogram/methods/messages/send_reaction.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ async def send_reaction(
2727
self: "pyrogram.Client",
2828
chat_id: Union[int, str],
2929
message_id: int,
30-
emoji: str = ""
30+
emoji: str = "",
31+
big: bool = False
3132
) -> bool:
3233
"""Send a reaction to a message.
3334
@@ -41,6 +42,10 @@ async def send_reaction(
4142
emoji (``str``, *optional*):
4243
Reaction emoji.
4344
Pass "" as emoji (default) to retract the reaction.
45+
46+
big (``bool``, *optional*):
47+
Pass True to show a bigger and longer reaction.
48+
Defaults to False.
4449
4550
Returns:
4651
``bool``: On success, True is returned.
@@ -58,7 +63,8 @@ async def send_reaction(
5863
raw.functions.messages.SendReaction(
5964
peer=await self.resolve_peer(chat_id),
6065
msg_id=message_id,
61-
reaction=emoji
66+
reaction=emoji,
67+
big=big
6268
)
6369
)
6470

‎pyrogram/types/messages_and_media/message.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3310,7 +3310,7 @@ async def click(self, x: Union[int, str] = 0, y: int = None, quote: bool = None,
33103310
else:
33113311
await self.reply(button, quote=quote)
33123312

3313-
async def react(self, emoji: str = "") -> bool:
3313+
async def react(self, emoji: str = "", big: bool = False) -> bool:
33143314
"""Bound method *react* of :obj:`~pyrogram.types.Message`.
33153315
33163316
Use as a shortcut for:
@@ -3332,6 +3332,10 @@ async def react(self, emoji: str = "") -> bool:
33323332
emoji (``str``, *optional*):
33333333
Reaction emoji.
33343334
Pass "" as emoji (default) to retract the reaction.
3335+
3336+
big (``bool``, *optional*):
3337+
Pass True to show a bigger and longer reaction.
3338+
Defaults to False.
33353339
33363340
Returns:
33373341
``bool``: On success, True is returned.
@@ -3343,7 +3347,8 @@ async def react(self, emoji: str = "") -> bool:
33433347
return await self._client.send_reaction(
33443348
chat_id=self.chat.id,
33453349
message_id=self.id,
3346-
emoji=emoji
3350+
emoji=emoji,
3351+
big=big
33473352
)
33483353

33493354
async def retract_vote(

0 commit comments

Comments
 (0)