KeyboardButtonRequestChat¶
- class telegram.KeyboardButtonRequestChat(request_id, chat_is_channel, chat_is_forum=None, chat_has_username=None, chat_is_created=None, user_administrator_rights=None, bot_administrator_rights=None, bot_is_member=None, request_title=None, request_username=None, request_photo=None, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObjectThis object defines the criteria used to request a suitable chat. The identifier of the selected user will be shared with the bot when the corresponding button is pressed. More about requesting users ».
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their
request_idis equal.Available In
Added in version 20.1.
- Parameters:
request_id (
int) – Signed 32-bit identifier of the request, which will be received back in thetelegram.ChatSharedobject. Must be unique within the message.chat_is_channel (
bool) – PassTrueto request a channel chat, passFalseto request a group or a supergroup chat.chat_is_forum (
bool, optional) – PassTrueto request a forum supergroup, passFalseto request a non-forum chat. If not specified, no additional restrictions are applied.chat_has_username (
bool, optional) – PassTrueto request a supergroup or a channel with a username, passFalseto request a chat without a username. If not specified, no additional restrictions are applied.chat_is_created (
bool, optional) – PassTrueto request a chat owned by the user. Otherwise, no additional restrictions are applied.user_administrator_rights (
ChatAdministratorRights, optional) – Specifies the required administrator rights of the user in the chat. If not specified, no additional restrictions are applied.bot_administrator_rights (
ChatAdministratorRights, optional) – Specifies the required administrator rights of the bot in the chat. The rights must be a subset ofuser_administrator_rights. If not specified, no additional restrictions are applied.bot_is_member (
bool, optional) – PassTrueto request a chat with the bot as a member. Otherwise, no additional restrictions are applied.request_title (
bool, optional) –Pass
Trueto request the chat’s title.Added in version 21.1.
request_username (
bool, optional) –Pass
Trueto request the chat’s username.Added in version 21.1.
request_photo (
bool, optional) –Pass
Trueto request the chat’s photo.Added in version 21.1.
- chat_is_channel[source]¶
Pass
Trueto request a channel chat, passFalseto request a group or a supergroup chat.- Type:
- chat_is_forum[source]¶
Optional. Pass
Trueto request a forum supergroup, passFalseto request a non-forum chat. If not specified, no additional restrictions are applied.- Type:
- chat_has_username[source]¶
Optional. Pass
Trueto request a supergroup or a channel with a username, passFalseto request a chat without a username. If not specified, no additional restrictions are applied.- Type:
- user_administrator_rights[source]¶
required administrator rights of the user in the chat. If not specified, no additional restrictions are applied.
- Type:
- bot_administrator_rights[source]¶
required administrator rights of the bot in the chat. The rights must be a subset of
user_administrator_rights. If not specified, no additional restrictions are applied.- Type:
- request_title[source]¶
Optional. Pass
Trueto request the chat’s title.Added in version 21.1.
- Type:
- request_username[source]¶
Optional. Pass
Trueto request the chat’s username.Added in version 21.1.
- Type:
- request_photo[source]¶
Optional. Pass
Trueto request the chat’s photo.Added in version 21.1.
- Type: