Link Search Menu Expand Document

Constructor: keyboardButtonSwitchInline

Back to constructors index

Button to force a user to switch to inline mode: pressing the button will prompt the user to select one of their chats, open that chat and insert the bot’s username and the specified inline query in the input field.

Attributes:

NameTypeRequiredDescription
same_peerBoolOptionalIf set, pressing the button will insert the bot’s username and the specified inline query in the current chat’s input field.
textstringYesButton label
querystringYesThe inline query to use
peer_typesArray of InlineQueryPeerTypeOptionalFilter to use when selecting chats.

Type: KeyboardButton

Example:

$keyboardButtonSwitchInline = ['_' => 'keyboardButtonSwitchInline', 'same_peer' => Bool, 'text' => 'string', 'query' => 'string', 'peer_types' => [InlineQueryPeerType, InlineQueryPeerType]];