feat: Add support for message_reaction and message_reaction_count events #348
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was done?
Added handling of two types of Telegram Bot API events:
Changes
MessageReactionUpdateandMessageReactionCountUpdateCompatibility
Why is this important?
Telegram has long since added reactions to messages, and now bots can:
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
MessageReactionCountUpdatetype 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.Links
Checklist