get_message_reactions()¶
- async Client.get_message_reactions()¶
Get reactions added to a specific message.
Usable by Users Bots- Parameters:
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat.message_id (
int) – Identifier of the target message.reaction (
str|int|Reaction, optional) – Target reaction to filter by. Can be an emoji string (e.g. “👍”), a custom emoji ID (int), or aReactionobject. Defaults to None (returns all reactions).limit (
int, optional) – Limits the number of reactions to be retrieved. By default, no limit is applied and all reactions are returned.
- Returns:
Generator– A generator yieldingMessagePeerReactionobjects.
Example
# Get all reactions on a message async for reaction in app.get_message_reactions(chat_id, message_id): print(reaction.user.first_name, reaction.reaction) # Get only thumbs-up reactions async for reaction in app.get_message_reactions(chat_id, message_id, reaction="👍"): print(reaction.user.first_name)