Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pyrogram/methods/messages/send_reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ async def send_reaction(
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.

Expand All @@ -41,6 +42,10 @@ async def send_reaction(
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.
Expand All @@ -58,7 +63,8 @@ async def send_reaction(
raw.functions.messages.SendReaction(
peer=await self.resolve_peer(chat_id),
msg_id=message_id,
reaction=emoji
reaction=emoji,
big=big
)
)

Expand Down
9 changes: 7 additions & 2 deletions pyrogram/types/messages_and_media/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -3310,7 +3310,7 @@ async def click(self, x: Union[int, str] = 0, y: int = None, quote: bool = None,
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:
Expand All @@ -3332,6 +3332,10 @@ async def react(self, emoji: str = "") -> bool:
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.
Expand All @@ -3343,7 +3347,8 @@ async def react(self, emoji: str = "") -> bool:
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(
Expand Down