Message.star()#

Message.star()#

Bound method star of Message.

Use as a shortcut for:

await client.add_paid_message_reaction(
    chat_id=chat_id,
    message_id=message.id,
    star_count=1
)

Example

# Add a paid reaction to a message
await message.star(1)

# Add an anonymous paid reaction to a message
await message.star(1, True)
Parameters:
  • star_count (int, optional) – Number of Telegram Stars to be used for the reaction; 1-2500.

  • paid_reaction_type (PaidReactionType, optional) – Type of the paid reaction; pass None if the user didn’t choose reaction type explicitly, for example, the reaction is set from the message bubble.

Returns:

On success, MessageReactions – is returned.

Raises:

RPCError – In case of a Telegram RPC error.