Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Bot API 7.0 Reactions #354

Merged
merged 3 commits into from
Jan 12, 2024
Merged

Implement Bot API 7.0 Reactions #354

merged 3 commits into from
Jan 12, 2024

Conversation

anfanik
Copy link
Collaborator

@anfanik anfanik commented Jan 8, 2024

This pull request implements Reactions part of Bot API 7.0 update:

Reactions

  • Added the classes ReactionTypeEmoji and ReactionTypeCustomEmoji representing different types of reaction.
  • Added updates about a reaction change on a message with non-anonymous reactions, represented by the class MessageReactionUpdated and the field message_reaction in the class Update. The bot must explicitly allow the update to receive it.
  • Added updates about reaction changes on a message with anonymous reactions, represented by the class MessageReactionCountUpdated and the field message_reaction_count in the class Update. The bot must explicitly allow the update to receive it.
  • Added the method setMessageReaction that allows bots to react to messages.
  • Added the field available_reactions to the class Chat.

Changes:

  • Add SetMessageReaction request see setMessageReaction
  • Add message_reaction and message_reaction_count updates to Update see Update
  • Add available_reactions field to Chat see Chat
  • Add ReactionTypeAdapter because of requirement to use discriminator field in ReactionType and use BotUtils#GSON in TelegramBotClient
  • Move BotUtils to com.pengrad.telegrambot.utility package

- add setMessageReaction request
- add message_reaction & message_reaction_count updates
- add available_reactions to Chat
@anfanik anfanik mentioned this pull request Jan 8, 2024
Copy link
Collaborator

@mircoianese mircoianese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve

@mircoianese mircoianese merged commit c83510e into pengrad:master Jan 12, 2024
@mircoianese mircoianese mentioned this pull request Jan 12, 2024
10 tasks
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.

None yet

2 participants