Skip to content

Commit

Permalink
Update send_reaction description
Browse files Browse the repository at this point in the history
  • Loading branch information
KurimuzonAkuma committed Dec 12, 2023
1 parent c991036 commit 7ba3424
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions pyrogram/methods/messages/send_reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ async def send_reaction(
chat_id (``int`` | ``str``):
Unique identifier (int) or username (str) of the target chat.
message_id (``int``):
message_id (``int``, *optional*):
Identifier of the message.
story_id (``int``):
story_id (``int``, *optional*):
Identifier of the story.
emoji (``int`` | ``str``, *optional*):
Reaction emoji.
Pass "" as emoji (default) to retract the reaction.
Pass None as emoji (default) to retract the reaction.
big (``bool``, *optional*):
Pass True to show a bigger and longer reaction.
Expand All @@ -60,10 +60,16 @@ async def send_reaction(
.. code-block:: python
# Send a reaction
await app.send_reaction(chat_id, message_id, "🔥")
await app.send_reaction(chat_id, message_id=message_id, emoji="🔥")
# Send a reaction with premium emoji
await app.send_reaction(chat_id, message_id=message_id, emoji=5319161050128459957)
# Send a reaction to story
await app.send_reaction(chat_id, story_id=story_id, emoji="❤️")
# Retract a reaction
await app.send_reaction(chat_id, message_id)
await app.send_reaction(chat_id, message_id=message_id)
"""
if isinstance(emoji, int):
emoji = [raw.types.ReactionCustomEmoji(document_id=emoji)]
Expand Down

0 comments on commit 7ba3424

Please sign in to comment.