SwitchInlineQueryChosenChat

class telegram.SwitchInlineQueryChosenChat(query=None, allow_user_chats=None, allow_bot_chats=None, allow_group_chats=None, allow_channel_chats=None, *, api_kwargs=None)[source]

Bases: telegram.TelegramObject

This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their query, allow_user_chats, allow_bot_chats, allow_group_chats, and allow_channel_chats are equal.

Added in version 20.3.

Caution

The PTB team has discovered that you must pass at least one of allow_user_chats, allow_bot_chats, allow_group_chats, or allow_channel_chats to Telegram. Otherwise, an error will be raised.

Parameters:
query[source]

Optional. The default inline query to be inserted in the input field. If left empty, only the bot’s username will be inserted.

Type:

str

allow_user_chats[source]

Optional. True, if private chats with users can be chosen.

Type:

bool

allow_bot_chats[source]

Optional. True, if private chats with bots can be chosen.

Type:

bool

allow_group_chats[source]

Optional. True, if group and supergroup chats can be chosen.

Type:

bool

allow_channel_chats[source]

Optional. True, if channel chats can be chosen.

Type:

bool