Skip to content

Conversation

@Legolase
Copy link

@Legolase Legolase commented Nov 28, 2025

What was done?

Added handling of two types of Telegram Bot API events:

  • message_reaction - the update represents a change of a reaction on a message performed by a user. Link.
  • message_reaction_count - the update represents reaction changes on a message with anonymous reactions. Link.

Changes

  • ✅ Added new classes/structs for MessageReactionUpdate and MessageReactionCountUpdate
  • ✅ Added corresponding event handler methods
  • ✅ Added documentation for new methods

Compatibility

  • ✅ Backward compatible changes
  • ✅ New functionality is optional

Why is this important?

Telegram has long since added reactions to messages, and now bots can:

  • Track user reactions
  • Create interactive interfaces using reactions

Although the latest release version of the library does not allow handling reactions to messages.

Testing

Testing was performed by a developer using a custom-created bot. The testing included checking for the receipt of the two aforementioned events. The test result was positive. My minor modifications allowed the necessary events to be captured.

It's worth noting that events of the MessageReactionCountUpdate type arrive with a significant delay of up to several seconds due to the Telegram Bot API. The API documentation specifically clarifies this effect, which no event handler can affect. Link.

The updates are grouped and can be sent with delay up to a few minutes.

Links

Checklist

  • The code follows the project style
  • Documentation updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant