
    /j                      t    d Z ddlmZ ddlmZ ddlmZ ddlmZ erddl	m
Z
  G d de      Z G d	 d
e      Zy)zQThis module contains objects that represent managed bots in the Telegram Bot API.    )TYPE_CHECKING)TelegramObject)User)JSONDict)Botc                   `     e Zd ZdZdZdddededz  f fdZeddedd	d
d f fd       Z	 xZ
S )ManagedBotCreateda  
    This object contains information about the bot that was created to be managed by the current
    bot.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`bot` is equal.

    .. versionadded:: 22.8

    Args:
        bot (:class:`telegram.User`): Information about the bot. The bot's token can be fetched
            using the method :meth:`~telegram.Bot.get_managed_bot_token`.
    Attributes:
        bot (:class:`telegram.User`): Information about the bot. The bot's token can be fetched
            using the method :meth:`~telegram.Bot.get_managed_bot_token`.
    )botN
api_kwargsr
   r   c                x    t         |   |       || _        | j                  f| _        | j	                          y Nr   )super__init__r
   	_id_attrs_freeze)selfr
   r   	__class__s      R/var/www/html/maxservice/venv/lib/python3.12/site-packages/telegram/_managedbot.pyr   zManagedBotCreated.__init__5   s2     	J/((    data
Bot | Nonereturnc                     | j                  |      }t        j                  |d   |      |d<   t        | 	  ||      S ),See :meth:`telegram.TelegramObject.de_json`.r   r
   r   r
   _parse_datar   de_jsonr   clsr   r
   r   s      r   r    zManagedBotCreated.de_json@   s@     D)llU=UwDc22r   N__name__
__module____qualname____doc__	__slots__r   r   r   classmethodr    __classcell__r   s   @r   r	   r	   !   sY    " I '+			 tO		 38 3, 3BU 3 3r   r	   c                   d     e Zd ZdZdZdddedededz  f fdZedd	edd
dd f fd       Z	 xZ
S )ManagedBotUpdatedaD  
    This object contains information about the creation, token update, or owner update of a bot
    that is managed by the current bot.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`user` and :attr:`bot` are equal.

    .. versionadded:: 22.8

    Args:
        user (:class:`telegram.User`): User that created the bot.
        bot (:class:`telegram.User`): Information about the bot. Token of the bot can be fetched
            using the method :meth:`~telegram.Bot.get_managed_bot_token`.

    Attributes:
        user (:class:`telegram.User`): User that created the bot.
        bot (:class:`telegram.User`): Information about the bot. Token of the bot can be fetched
            using the method :meth:`~telegram.Bot.get_managed_bot_token`.
    )r
   userNr   r/   r
   r   c                    t         |   |       || _        || _        | j                  | j                  f| _        | j                          y r   )r   r   r/   r
   r   r   )r   r/   r
   r   r   s       r   r   zManagedBotUpdated.__init__a   sG     	J/	 IIHH
 	r   r   r   r   c                     | j                  |      }t        j                  |d   |      |d<   t        j                  |d   |      |d<   t        | 	  ||      S )r   r   r/   r   r
   r   r!   s      r   r    zManagedBotUpdated.de_jsons   sX     D)||f3?VllU=UwDc22r   r#   r$   r,   s   @r   r.   r.   J   sc    (  I '+ 
 tO$ 38 3, 3BU 3 3r   r.   N)r(   typingr   telegram._telegramobjectr   telegram._userr   telegram._utils.typesr   telegramr   r	   r.    r   r   <module>r8      s:   & X   3  &3 &3R13 13r   