KeyboardButtonSwitchInline

class pyrogram.raw.types.KeyboardButtonSwitchInline

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.

Constructor of KeyboardButton.

Details:
  • Layer: 223

  • ID: 991399FC

Parameters:
  • text (str) – Button label

  • query (str) – The inline query to use

  • same_peer (bool, optional) – If set, pressing the button will insert the bot’s username and the specified inline query in the current chat’s input field.

  • style (KeyboardButtonStyle, optional)

  • peer_types (List of InlineQueryPeerType, optional) – Filter to use when selecting chats.

TL Schema

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

= KeyboardButton

Parameter Tree

KeyboardButtonSwitchInline
├── same_peertrue (optional)
├── styleKeyboardButtonStyle (optional)
│ └── KeyboardButtonStyle
│ ├── bg_primarytrue (optional)
│ ├── bg_dangertrue (optional)
│ ├── bg_successtrue (optional)
│ └── iconlong (optional)
├── textstring
├── querystring
└── peer_typesVector < InlineQueryPeerType > (optional)

Example

KeyboardButtonSwitchInline(
    text="Open",
    query="text",
)