Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# ReactionType

class telegram.ReactionType(type, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  Base class for Telegram ReactionType Objects. There exist `telegram.ReactionTypeEmoji` and `telegram.ReactionTypeCustomEmoji`.

  Use In

  `telegram.Bot.set_message_reaction()`

  Available In

  - `telegram.Chat.available_reactions`

  - `telegram.MessageReactionUpdated.new_reaction`

  - `telegram.MessageReactionUpdated.old_reaction`

  - `telegram.ReactionCount.type`

  New in version 20.8.

  Parameters:

    type (`str`) – Type of the reaction. Can be `EMOJI` or `CUSTOM_EMOJI`.

  type

    Type of the reaction. Can be `EMOJI` or `CUSTOM_EMOJI`.

    Type:

      `str`

  CUSTOM_EMOJI = 'custom_emoji'

    `telegram.constants.ReactionType.CUSTOM_EMOJI`

  EMOJI = 'emoji'

    `telegram.constants.ReactionType.EMOJI`

  classmethod de_json(data, bot)

    See `telegram.TelegramObject.de_json()`.