setMessageReaction¶
Returns: bool
- class litegram.methods.set_message_reaction.SetMessageReaction(*, chat_id: ChatIdUnion, message_id: int, reaction: list[ReactionTypeUnion] | None = None, is_big: bool | None = None, **extra_data: Any)[source]¶
Use this method to change the chosen reactions on a message. Service messages of some types 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
Trueon success.Source: https://core.telegram.org/bots/api#setmessagereaction
- chat_id: ChatIdUnion¶
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[ReactionTypeUnion] | 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.
Usage¶
As bot method¶
result: bool = await bot.set_message_reaction(...)
Method as object¶
Imports:
from litegram.methods.set_message_reaction import SetMessageReactionalias:
from litegram.methods import SetMessageReaction
With specific bot¶
result: bool = await bot(SetMessageReaction(...))
As reply into Webhook in handler¶
return SetMessageReaction(...)