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.
Constructor schema is available as of layer 55. Switch »
| Name | Type | Description |
|---|---|---|
| flags | # | Flags, see TL conditional fields |
| same_peer | flags.0?true | If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. |
| style | flags.10?KeyboardButtonStyle | Button style, see here » for more info on button styles. |
| text | string | Button label |
| query | string | The inline query to use |
| peer_types | flags.1?Vector<InlineQueryPeerType> | Filter to use when selecting chats. |
Users can interact with your bot via buttons or even inline buttons, straight from inline messages in any chat.
Represents an inline keyboard
Users can interact with your bot via inline queries, straight from the text input field in any chat.