
    Ii-                         S r SSKJrJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  SSKJr  SSKJr  \(       a  SS	KJr   " S
 S\5      r " S S\5      r " S S\5      rg)z8This module contains two objects to request chats/users.    )TYPE_CHECKINGOptional)ChatAdministratorRights)TelegramObject)JSONDict)warn)!build_deprecation_warning_message)PTBDeprecationWarning)Botc                   r   ^  \ rS rSrSrSr   SSS.S\S\\   S\\   S	\\   S
\\	   4
U 4S jjjjr
SrU =r$ )KeyboardButtonRequestUsers!   aW	  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.

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.

.. seealso::
    `Telegram Docs on requesting users         <https://core.telegram.org/bots/features#chat-and-user-selection>`_

.. versionadded:: 20.8
    This class was previously named :class:`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

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
)max_quantity
request_iduser_is_botuser_is_premiumN
api_kwargsr   r   r   r   r   c                   > [         TU ]  US9  Xl        X l        X0l        X@l        U R                  4U l        U R                  5         g Nr   )super__init__r   r   r   r   	_id_attrs_freezeselfr   r   r   r   r   	__class__s         E/venv/lib/python3.13/site-packages/telegram/_keyboardbuttonrequest.pyr   #KeyboardButtonRequestUsers.__init__V   sE     	J/) ,7/>+7//+    )r   r   r   r   r   NNN__name__
__module____qualname____firstlineno____doc__	__slots__intr   boolr   r   __static_attributes____classcell__r   s   @r   r   r   !   sp    +ZI '+*.&* *. d^ "$	
 sm X& r    r   c                   r   ^  \ rS rSrSrSr   SSS.S\S\\   S\\   S	\\   S
\\	   4
U 4S jjjjr
SrU =r$ )KeyboardButtonRequestUserm   zAlias for :class:`KeyboardButtonRequestUsers`, kept for backward compatibility.

.. versionadded:: 20.1

.. deprecated:: 20.8
    Use :class:`KeyboardButtonRequestUsers` instead.

 Nr   r   r   r   r   r   c          	      z   > [         TU ]  UUUUUS9  [        [        SSSSS9[        SS9  U R                  5         g )	N)r   r   r   r   r   r/   r   classz7.0)deprecated_namenew_nameobject_typebot_api_version   )
stacklevel)r   r   r   r	   r
   r   r   s         r   r   "KeyboardButtonRequestUser.__init__y   sW     	!#+%! 	 	
 	- ;5# %	 "		
 	r    r!   r"   r-   s   @r   r/   r/   m   so     I
 '+*.&* *. d^ "$	
 sm X& r    r/   c                      ^  \ rS rSrSrSr      SSS.S\S\S\\   S	\\   S
\\   S\\	   S\\	   S\\   S\\
   4U 4S jjjjr\S\\
   SSS\S    4U 4S jj5       rSrU =r$ )KeyboardButtonRequestChat   a  This 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.

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.

.. seealso::
    `Telegram Docs on requesting chats         <https://core.telegram.org/bots/features#chat-and-user-selection>`_

.. 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.
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.
)bot_administrator_rightsbot_is_memberchat_has_usernamechat_is_channelchat_is_createdchat_is_forumr   user_administrator_rightsNr   r   rA   rC   r@   rB   rD   r>   r?   r   c	                   > [         T
U ]  U	S9  Xl        X l        X0l        X@l        XPl        UU l        Xpl        Xl	        U R                  4U l
        U R                  5         g r   )r   r   r   rA   rC   r@   rB   rD   r>   r?   r   r   )r   r   rA   rC   r@   rB   rD   r>   r?   r   r   s             r   r   "KeyboardButtonRequestChat.__init__   sf     	J/)%4 .;1B/>% 	& Ld%-://+r    databotr   returnc                    > U R                  U5      nU(       d  g[        R                  " UR                  S5      U5      US'   [        R                  " UR                  S5      U5      US'   [        TU ]	  XS9$ )z,See :meth:`telegram.TelegramObject.de_json`.NrD   r>   )rG   rH   )_parse_datar   de_jsongetr   )clsrG   rH   r   s      r   rL   !KeyboardButtonRequestChat.de_json   sy    
 t$,C,K,KHH013-
() ,C+J+JHH/0#,
'( wD22r    )	r   r>   r?   r@   rA   rB   rC   r   rD   )NNNNNN)r#   r$   r%   r&   r'   r(   r)   r*   r   r   r   r   classmethodrL   r+   r,   r-   s   @r   r<   r<      s    7r	I )-,0*.GKFJ(, *.   ~	
 $D> "$ $,,C#D #++B"C  ~ X& @ 3H%3,13	-	.3 3r    r<   N)r'   typingr   r   !telegram._chatadministratorrightsr   telegram._telegramobjectr   telegram._utils.typesr   telegram._utils.warningsr   #telegram._utils.warnings_transitionr	   telegram.warningsr
   telegramr   r   r/   r<   r1   r    r   <module>rY      sP   & ? * E 3 * ) Q 3I IX( : (Vv3 v3r    