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
, andallow_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
, orallow_channel_chats
to Telegram. Otherwise, an error will be raised.- Parameters:
query (
str
, optional) – The default inline query to be inserted in the input field. If left empty, only the bot’s username will be inserted.allow_user_chats (
bool
, optional) – PassTrue
, if private chats with users can be chosen.allow_bot_chats (
bool
, optional) – PassTrue
, if private chats with bots can be chosen.allow_group_chats (
bool
, optional) – PassTrue
, if group and supergroup chats can be chosen.allow_channel_chats (
bool
, optional) – PassTrue
, if channel chats can be chosen.