Currently, InlineKeyboardButton always includes "pay":false in its JSON representation.
This breaks some of the other button types, such as switch_inline_query_current_chat, for which Telegram will error out when set.
My assumption is that this is caused by Telegram checking pay before switch_inline_query_current_chat, but after callback_data (or else I believe this bug would have been found before.)
The fix is super simple, and just uses the Boolean wrapper type instead of the boolean primitive.
Currently,
InlineKeyboardButton
always includes"pay":false
in its JSON representation. This breaks some of the other button types, such asswitch_inline_query_current_chat
, for which Telegram will error out when set.My assumption is that this is caused by Telegram checking
pay
beforeswitch_inline_query_current_chat
, but aftercallback_data
(or else I believe this bug would have been found before.)The fix is super simple, and just uses the
Boolean
wrapper type instead of theboolean
primitive.