KeyboardButtonSwitchInline#

class pyrogram.raw.types.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.

Constructor of KeyboardButton.

Details:
  • Layer: 227

  • 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) – Button style, see here » for more info on button styles.

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

Functions:

This object can be returned by 1 function.

bots.GetRequestedWebViewButton

Fetch the peer request button a bot prepared for a Mini App with bots.requestWebViewButton, invoked when the Mini App emits a web_app_request_chat event, see here for more info.