keyboardButtonSwitchInline #

Button to switch the user to inline mode

Available only in inline keyboards.

When pressed, clients must insert the bot's username and query into the chat input field, triggering an inline query.

If same_peer is set, clients use the current chat. Otherwise, clients prompt the user to select a chat, filtered by peer_types if specified.

Layer 223

keyboardButtonSwitchInline#991399fc flags:# same_peer:flags.0?true style:flags.10?KeyboardButtonStyle text:string query:string peer_types:flags.1?Vector<InlineQueryPeerType> = KeyboardButton;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
same_peerflags.0?trueIf set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field.
styleflags.10?KeyboardButtonStyleButton style, see here » for more info on button styles.
textstringButton label
querystringThe inline query to use
peer_typesflags.1?Vector<InlineQueryPeerType>Filter to use when selecting chats.

Type #

KeyboardButton

Bot buttons #

Users can interact with your bot via buttons or even inline buttons, straight from inline messages in any chat.

replyInlineMarkup #

Represents an inline keyboard

Inline queries #

Users can interact with your bot via inline queries, straight from the text input field in any chat.