botman / driver-telegram

BotMan Telegram Driver
MIT License
88 stars 75 forks source link

Allow to set switch_inline_query or switch_inline_query_current_chat for Button #85

Closed vdomah closed 3 months ago

vdomah commented 4 years ago

Hi! To allow implementing Buttons with Inline mode support we need to make callback_data parameter not mandatory. From docs https://core.telegram.org/bots/api#inlinekeyboardbutton

InlineKeyboardButton
This object represents one button of an inline keyboard. You must use exactly one of the optional fields.

So before this PR setting switch_inline_query param will not affect the result because always existing callback_data param will suppress it.

filippotoso commented 3 months ago

I'm closing this but manully integrated the requeste feature due to conflicts.