setMessageReaction¶
Returns: bool
- class aiogram.methods.set_message_reaction.SetMessageReaction(*, chat_id: int | str, message_id: int, reaction: list[ReactionTypeEmoji | ReactionTypeCustomEmoji | ReactionTypePaid] | None = None, is_big: bool | None = None, **extra_data: Any)[source]¶
Use this method to change the chosen reactions on a message. Service messages can’t be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can’t use paid reactions. Returns
True
on success.Source: https://core.telegram.org/bots/api#setmessagereaction
- chat_id: int | str¶
Unique identifier for the target chat or username of the target channel (in the format
@channelusername
)
- message_id: int¶
Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.
- reaction: list[ReactionTypeEmoji | ReactionTypeCustomEmoji | ReactionTypePaid] | None¶
A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can’t be used by bots.
- is_big: bool | None¶
Pass
True
to set the reaction with a big animation
Usage¶
As bot method¶
result: bool = await bot.set_message_reaction(...)
Method as object¶
Imports:
from aiogram.methods.set_message_reaction import SetMessageReaction
alias:
from aiogram.methods import SetMessageReaction
With specific bot¶
result: bool = await bot(SetMessageReaction(...))
As reply into Webhook in handler¶
return SetMessageReaction(...)