L i2dZddlmZmZddlmZddlmZddlm Z ddl m Z erddl m Z Gdd eZGd d eZy ) z8This module contains two objects to request chats/users.) TYPE_CHECKINGOptional)ChatAdministratorRights)TelegramObject)de_json_optional)JSONDict)BotceZdZdZdZ ddddedeedeedeed eed eed eed eeffd Z xZ S)KeyboardButtonRequestUsersu 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 :attr:`request_id` is equal. .. versionadded:: 20.8 This class was previously named ``KeyboardButtonRequestUser``. Args: request_id (:obj:`int`): Signed 32-bit identifier of the request, which will be received back in the :class:`telegram.UsersShared` object. Must be unique within the message. user_is_bot (:obj:`bool`, optional): Pass :obj:`True` to request a bot, pass :obj:`False` to request a regular user. If not specified, no additional restrictions are applied. user_is_premium (:obj:`bool`, optional): Pass :obj:`True` to request a premium user, pass :obj:`False` to request a non-premium user. If not specified, no additional restrictions are applied. max_quantity (:obj:`int`, optional): The maximum number of users to be selected; :tg-const:`telegram.constants.KeyboardButtonRequestUsersLimit.MIN_QUANTITY` - :tg-const:`telegram.constants.KeyboardButtonRequestUsersLimit.MAX_QUANTITY`. Defaults to :tg-const:`telegram.constants.KeyboardButtonRequestUsersLimit.MIN_QUANTITY` . .. versionadded:: 20.8 request_name (:obj:`bool`, optional): Pass :obj:`True` to request the users' first and last name. .. versionadded:: 21.1 request_username (:obj:`bool`, optional): Pass :obj:`True` to request the users' username. .. versionadded:: 21.1 request_photo (:obj:`bool`, optional): Pass :obj:`True` to request the users' photo. .. versionadded:: 21.1 Attributes: request_id (:obj:`int`): Identifier of the request. user_is_bot (:obj:`bool`): Optional. Pass :obj:`True` to request a bot, pass :obj:`False` to request a regular user. If not specified, no additional restrictions are applied. user_is_premium (:obj:`bool`): Optional. Pass :obj:`True` to request a premium user, pass :obj:`False` to request a non-premium user. If not specified, no additional restrictions are applied. max_quantity (:obj:`int`): Optional. The maximum number of users to be selected; :tg-const:`telegram.constants.KeyboardButtonRequestUsersLimit.MIN_QUANTITY` - :tg-const:`telegram.constants.KeyboardButtonRequestUsersLimit.MAX_QUANTITY`. Defaults to :tg-const:`telegram.constants.KeyboardButtonRequestUsersLimit.MIN_QUANTITY` . .. versionadded:: 20.8 request_name (:obj:`bool`): Optional. Pass :obj:`True` to request the users' first and last name. .. versionadded:: 21.1 request_username (:obj:`bool`): Optional. Pass :obj:`True` to request the users' username. .. versionadded:: 21.1 request_photo (:obj:`bool`): Optional. Pass :obj:`True` to request the users' photo. .. versionadded:: 21.1 ) max_quantity request_id request_name request_photorequest_username user_is_botuser_is_premiumN api_kwargsr rrr rrrrct ||||_||_||_||_||_||_||_|jf|_ |jyNr) super__init__r rrr rrr _id_attrs_freeze) selfr rrr rrrr __class__s e/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_keyboardbuttonrequest.pyrz#KeyboardButtonRequestUsers.__init__jse J/),7/>+7,80@-://+ )NNNNNN) __name__ __module__ __qualname____doc__ __slots__intrboolrr __classcell__rs@rr r s=~I'+*.&*'++/(,*.d^"$  sm  tn #4. ~X&rr ceZdZdZdZ ddddededeedeed eed eed eed eed eedeedeedee ffdZ e dde dedddffd Z xZ S)KeyboardButtonRequestChatuThis 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 :attr:`request_id` is equal. .. versionadded:: 20.1 Args: request_id (:obj:`int`): Signed 32-bit identifier of the request, which will be received back in the :class:`telegram.ChatShared` object. Must be unique within the message. chat_is_channel (:obj:`bool`): Pass :obj:`True` to request a channel chat, pass :obj:`False` to request a group or a supergroup chat. chat_is_forum (:obj:`bool`, optional): Pass :obj:`True` to request a forum supergroup, pass :obj:`False` to request a non-forum chat. If not specified, no additional restrictions are applied. chat_has_username (:obj:`bool`, optional): Pass :obj:`True` to request a supergroup or a channel with a username, pass :obj:`False` to request a chat without a username. If not specified, no additional restrictions are applied. chat_is_created (:obj:`bool`, optional): Pass :obj:`True` to request a chat owned by the user. Otherwise, no additional restrictions are applied. user_administrator_rights (:class:`ChatAdministratorRights`, optional): Specifies the required administrator rights of the user in the chat. If not specified, no additional restrictions are applied. bot_administrator_rights (:class:`ChatAdministratorRights`, optional): Specifies the required administrator rights of the bot in the chat. The rights must be a subset of :paramref:`user_administrator_rights`. If not specified, no additional restrictions are applied. bot_is_member (:obj:`bool`, optional): Pass :obj:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied. request_title (:obj:`bool`, optional): Pass :obj:`True` to request the chat's title. .. versionadded:: 21.1 request_username (:obj:`bool`, optional): Pass :obj:`True` to request the chat's username. .. versionadded:: 21.1 request_photo (:obj:`bool`, optional): Pass :obj:`True` to request the chat's photo. .. versionadded:: 21.1 Attributes: request_id (:obj:`int`): Identifier of the request. chat_is_channel (:obj:`bool`): Pass :obj:`True` to request a channel chat, pass :obj:`False` to request a group or a supergroup chat. chat_is_forum (:obj:`bool`): Optional. Pass :obj:`True` to request a forum supergroup, pass :obj:`False` to request a non-forum chat. If not specified, no additional restrictions are applied. chat_has_username (:obj:`bool`): Optional. Pass :obj:`True` to request a supergroup or a channel with a username, pass :obj:`False` to request a chat without a username. If not specified, no additional restrictions are applied. chat_is_created (:obj:`bool`) Optional. Pass :obj:`True` to request a chat owned by the user. Otherwise, no additional restrictions are applied. user_administrator_rights (:class:`ChatAdministratorRights`) Optional. Specifies the required administrator rights of the user in the chat. If not specified, no additional restrictions are applied. bot_administrator_rights (:class:`ChatAdministratorRights`) Optional. Specifies the required administrator rights of the bot in the chat. The rights must be a subset of :attr:`user_administrator_rights`. If not specified, no additional restrictions are applied. bot_is_member (:obj:`bool`) Optional. Pass :obj:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied. request_title (:obj:`bool`): Optional. Pass :obj:`True` to request the chat's title. .. versionadded:: 21.1 request_username (:obj:`bool`): Optional. Pass :obj:`True` to request the chat's username. .. versionadded:: 21.1 request_photo (:obj:`bool`): Optional. Pass :obj:`True` to request the chat's photo. .. versionadded:: 21.1 ) bot_administrator_rights bot_is_memberchat_has_usernamechat_is_channelchat_is_created chat_is_forumr r request_titleruser_administrator_rightsNrr r-r/r,r.r1r*r+r0rrrc t || ||_||_||_||_||_||_||_||_ | |_ | |_ | |_ |jf|_ |jyr)rrr r-r/r,r.r1r*r+r0rrrr)rr r-r/r,r.r1r*r+r0rrrrs rrz"KeyboardButtonRequestChat.__init__s J/)%4.;1B/> % &Ld%-:-:0@-://+ rdatabotr returnc|j|}t|jdt||d<t|jdt||d<t|||S)z,See :meth:`telegram.TelegramObject.de_json`.r1r*)r3r4) _parse_datargetrrde_json)clsr3r4rs rr9z!KeyboardButtonRequestChat.de_jsonsnt$,< HH0 13JC-  (),< HH/ 02I3,  '(wDc22r) NNNNNNNNN)N)rr r!r"r#r$r%rrrr classmethodr9r&r's@rr)r)sFP I$)-,0*.GKFJ(,(,+/(,$*.$$$ ~ $ $D> $ "$ $$,,C#D$#++B"C$ ~$ ~$#4.$ ~$X&$L 38 3(5/ 3E` 3 3rr)N)r"typingrr!telegram._chatadministratorrightsrtelegram._telegramobjectrtelegram._utils.argumentparsingrtelegram._utils.typesrtelegramr r r)rrrCs<&?*E3<*ddNI3I3r