KeyboardButtonRequestUsers¶
- class aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers(*, request_id: int, user_is_bot: bool | None = None, user_is_premium: bool | None = None, max_quantity: int | None = None, request_name: bool | None = None, request_username: bool | None = None, request_photo: bool | None = None, **extra_data: Any)[source]¶
This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users »
Source: https://core.telegram.org/bots/api#keyboardbuttonrequestusers
- request_id: int¶
Signed 32-bit identifier of the request that will be received back in the
aiogram.types.users_shared.UsersShared
object. Must be unique within the message
- user_is_bot: bool | None¶
Optional. Pass
True
to request bots, passFalse
to request regular users. If not specified, no additional restrictions are applied.
- user_is_premium: bool | None¶
Optional. Pass
True
to request premium users, passFalse
to request non-premium users. If not specified, no additional restrictions are applied.
- max_quantity: int | None¶
Optional. The maximum number of users to be selected; 1-10. Defaults to 1.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_post_init(context: Any, /) → None¶
We need to both initialize private attributes and call the user-defined model_post_init method.
- request_name: bool | None¶
Optional. Pass
True
to request the users’ first and last names
- request_username: bool | None¶
Optional. Pass
True
to request the users’ usernames
- request_photo: bool | None¶
Optional. Pass
True
to request the users’ photos