
    YiB$                         S r SSKJrJr  SSKJr  SSKJr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g)zIThis module contains an object that represents a Telegram KeyboardButton.    )TYPE_CHECKINGOptional)KeyboardButtonPollType)KeyboardButtonRequestChatKeyboardButtonRequestUsers)TelegramObject)JSONDict)
WebAppInfo)Botc                      ^  \ rS rSrSrSr      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\S    4U 4S jjj5       rSrU =r$ )KeyboardButton!   a@  
This object represents one button of the reply keyboard. At most one of the optional fields
must be used to specify type of the button. For simple text buttons, :obj:`str`
can be used instead of this object to specify text of the button.

Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`text`, :attr:`request_contact`, :attr:`request_location`,
:attr:`request_poll`, :attr:`web_app`, :attr:`request_users` and :attr:`request_chat` are
equal.

Note:
    * Optional fields are mutually exclusive.
    * :attr:`request_contact` and :attr:`request_location` options will only work in Telegram
      versions released after 9 April, 2016. Older clients will display unsupported message.
    * :attr:`request_poll` option will only work in Telegram versions released after 23
      January, 2020. Older clients will display unsupported message.
    * :attr:`web_app` option will only work in Telegram versions released after 16 April, 2022.
      Older clients will display unsupported message.
    * :attr:`request_users` and :attr:`request_chat` options will only work in Telegram
      versions released after 3 February, 2023. Older clients will display unsupported
      message.

.. versionchanged:: 21.0
   Removed deprecated argument and attribute ``request_user``.
.. versionchanged:: 20.0
   :attr:`web_app` is considered as well when comparing objects of this type in terms of
   equality.
.. versionchanged:: 20.5
   :attr:`request_users` and :attr:`request_chat` are considered as well when
   comparing objects of this type in terms of equality.

Args:
    text (:obj:`str`): Text of the button. If none of the optional fields are used, it will be
        sent to the bot as a message when the button is pressed.
    request_contact (:obj:`bool`, optional): If :obj:`True`, the user's phone number will be
        sent as a contact when the button is pressed. Available in private chats only.
    request_location (:obj:`bool`, optional): If :obj:`True`, the user's current location will
        be sent when the button is pressed. Available in private chats only.
    request_poll (:class:`~telegram.KeyboardButtonPollType`, optional): If specified, the user
        will be asked to create a poll and send it to the bot when the button is pressed.
        Available in private chats only.
    web_app (:class:`~telegram.WebAppInfo`, optional): If specified, the described `Web App
        <https://core.telegram.org/bots/webapps>`_ will be launched when the button is pressed.
        The Web App will be able to send a :attr:`Message.web_app_data` service message.
        Available in private chats only.

        .. versionadded:: 20.0

    request_users (:class:`KeyboardButtonRequestUsers`, optional): If specified, pressing the
        button will open a list of suitable users. Tapping on any user will send its
        identifier to the bot in a :attr:`telegram.Message.users_shared` service message.
        Available in private chats only.

        .. versionadded:: 20.8
    request_chat (:class:`KeyboardButtonRequestChat`, optional): If specified, pressing the
        button will open a list of suitable chats. Tapping on a chat will send its
        identifier to the bot in a :attr:`telegram.Message.chat_shared` service message.
        Available in private chats only.

        .. versionadded:: 20.1
Attributes:
    text (:obj:`str`): Text of the button. If none of the optional fields are used, it will be
        sent to the bot as a message when the button is pressed.
    request_contact (:obj:`bool`): Optional. If :obj:`True`, the user's phone number will be
        sent as a contact when the button is pressed. Available in private chats only.
    request_location (:obj:`bool`): Optional. If :obj:`True`, the user's current location will
        be sent when the button is pressed. Available in private chats only.
    request_poll (:class:`~telegram.KeyboardButtonPollType`): Optional. If specified,
        the user will be asked to create a poll and send it to the bot when the button is
        pressed. Available in private chats only.
    web_app (:class:`~telegram.WebAppInfo`): Optional. If specified, the described `Web App
        <https://core.telegram.org/bots/webapps>`_ will be launched when the button is pressed.
        The Web App will be able to send a :attr:`Message.web_app_data` service message.
        Available in private chats only.

        .. versionadded:: 20.0
    request_users (:class:`KeyboardButtonRequestUsers`): Optional. If specified, pressing the
        button will open a list of suitable users. Tapping on any user will send its
        identifier to the bot in a :attr:`telegram.Message.users_shared` service message.
        Available in private chats only.

        .. versionadded:: 20.8
    request_chat (:class:`KeyboardButtonRequestChat`): Optional. If specified, pressing the
        button will open a list of suitable chats. Tapping on a chat will send its
        identifier to the bot in a :attr:`telegram.Message.chat_shared` service message.
        Available in private chats only.

        .. versionadded:: 20.1
)request_chatrequest_contactrequest_locationrequest_pollrequest_userstextweb_appN
api_kwargsr   r   r   r   r   r   r   r   c                <  > [         T	U ]  US9  Xl        X l        X0l        X@l        XPl        Xpl        X`l        U R                  U R                  U R                  U R
                  U R                  U R                  U R                  4U l	        U R                  5         g )Nr   )super__init__r   r   r   r   r   r   r   	_id_attrs_freeze)
selfr   r   r   r   r   r   r   r   	__class__s
            C/app/.venv/lib/python3.13/site-packages/telegram/_keyboardbutton.pyr   KeyboardButton.__init__   s     	J/ 	/>0@>J-4CPAM II  !!LL
 	    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'   [
        R                  " UR                  S5      U5      US'   [        R                  " UR                  S5      U5      US'   0 nUR                  S5      =n(       a  SU0n[        TU ]!  XUS9$ )z,See :meth:`telegram.TelegramObject.de_json`.Nr   r   r   r   request_user)r"   r#   r   )	_parse_datar   de_jsongetr   r   r
   r   _de_json)clsr"   r#   r   r&   r   s        r   r(   KeyboardButton.de_json   s    
 t$5==dhh~>VX[\^ : B B488OC\^a b_8@@.AY[^_^$,,TXXi-@#FY
  88N33<3(,7JwTzJJr!   )r   r   r   r   r   r   r   r   )NNNNNN)N)__name__
__module____qualname____firstlineno____doc__	__slots__strr   boolr   r
   r   r   r	   r   classmethodr(   __static_attributes____classcell__)r   s   @r   r   r   !   s    XtI +/+/9=(,<@>B" *."" "$" #4.	"
 56" *%" 89"   :;" X&" "H >BKH%K,4UOK	"	#K Kr!   r   N)r1   typingr   r    telegram._keyboardbuttonpolltyper   telegram._keyboardbuttonrequestr   r   telegram._telegramobjectr   telegram._utils.typesr	   telegram._webappinfor
   telegramr   r    r!   r   <module>r@      s3   & P * C a 3 * +^K^ ^Kr!   