KeyboardButtonRequestUsers¶
- class telegram.KeyboardButtonRequestUsers(request_id, user_is_bot=None, user_is_premium=None, max_quantity=None, request_name=None, request_username=None, request_photo=None, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObject
This object defines the criteria used to request a suitable user. 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_id
is equal.Available In
Added in version 20.8: This class was previously named
KeyboardButtonRequestUser
.- Parameters:
request_id (
int
) – Signed 32-bit identifier of the request, which will be received back in thetelegram.UsersShared
object. Must be unique within the message.user_is_bot (
bool
, optional) – PassTrue
to request a bot, passFalse
to request a regular user. If not specified, no additional restrictions are applied.user_is_premium (
bool
, optional) – PassTrue
to request a premium user, passFalse
to request a non-premium user. If not specified, no additional restrictions are applied.max_quantity (
int
, optional) –The maximum number of users to be selected;
1
-10
. Defaults to1
.Added in version 20.8.
request_name (
bool
, optional) –Pass
True
to request the users’ first and last name.Added in version 21.1.
request_username (
bool
, optional) –Pass
True
to request the users’ username.Added in version 21.1.
request_photo (
bool
, optional) –Pass
True
to request the users’ photo.Added in version 21.1.
- user_is_bot[source]¶
Optional. Pass
True
to request a bot, passFalse
to request a regular user. If not specified, no additional restrictions are applied.- Type:
- user_is_premium[source]¶
Optional. Pass
True
to request a premium user, passFalse
to request a non-premium user. If not specified, no additional restrictions are applied.- Type:
- max_quantity[source]¶
Optional. The maximum number of users to be selected;
1
-10
. Defaults to1
.Added in version 20.8.
- Type:
- request_name[source]¶
Optional. Pass
True
to request the users’ first and last name.Added in version 21.1.
- Type: