PaulSonOfLars / gotgbot

Autogenerated Go wrapper for the telegram API. Inspired by the python-telegram-bot library.
MIT License
493 stars 108 forks source link

Add reactions support. #142

Closed ti-bone closed 7 months ago

ti-bone commented 7 months ago

What

This introduces support for handling new reactions that are set on messages. Adds new filters: Reaction.FromUserID(id int64) - Checks whether the reaction from specified user or not. Reaction.FromAnonymousChatID(id int64) - Checks whether the reaction from specified anonymous channel\admin or not. Reaction.FromChatID(id int64) - Checks if the reaction has been set in specified chat Reaction.New(Old)ReactionIn(reaction string) - Checks if the newly set(removed) reaction contains emoji, which is provided as reaction argument.

Impact

ti-bone commented 7 months ago

Reaction.FromPeer(id int64) - Was renamed and merged from FromUserID and FromAnonymousChatID, checks if the specified peer(user or anonymous channel) sent this reaction update.