go-telegram / bot

Telegram Bot API Go framework
MIT License
753 stars 68 forks source link

[Feature] add 'HandlerTypeCallbackQueryGameShortName' #108

Closed oanhnn closed 2 months ago

oanhnn commented 3 months ago

Problem

A handler with type HandlerTypeCallbackQueryData will be matched by update.CallbackQuery.Data. So, you MUST use RegisterHandlerMatchFunc to add a handler for CallbackQuery with game_short_name (the data field may be empty. See more https://core.telegram.org/bots/api#callbackquery).

This feature will help you add a handler for CallbackQuery with game_short_name more easily.

Solution

Add const HandlerTypeCallbackQueryGameShortName. A handler with type HandlerTypeCallbackQueryGameShortName will be matched by update.CallbackQuery.GameShortName.