
    5i+                         d Z ddlm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)zOThis module contains an object that represents a chat owner change in the chat.    )TYPE_CHECKING)TelegramObject)User)de_json_optional)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 )ChatOwnerChangeda  This object represents a service message about an ownership change in the chat.

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

    .. versionadded:: 22.7

    Args:
        new_owner (:class:`telegram.User`): The new owner of the chat

    Attributes:
        new_owner (:class:`telegram.User`): The new owner of the chat

    	new_ownerN
api_kwargsr   r   c                x    t         |   |       || _        | j                  f| _        | j	                          y Nr   super__init__r   	_id_attrs_freezeselfr   r   	__class__s      Q/var/www/app/trading-bot/venv/lib/python3.12/site-packages/telegram/_chatowner.pyr   zChatOwnerChanged.__init__2   s3     	J/(..*    databot
Bot | Nonereturnc                     | j                  |      }t        |j                  d      t        |      |d<   t        |   ||      S z,See :meth:`telegram.TelegramObject.de_json`.r   )r   r   _parse_datar   getr   r   de_jsonclsr   r   r   s      r   r$   zChatOwnerChanged.de_json?   B     t$,TXXk-BD#N[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, 3BT 3 3r   r
   c                   j     e Zd ZdZdZ	 ddddedz  dedz  f fdZedded	d
dd f fd       Z	 xZ
S )ChatOwnerLeftap  This object represents a service message about the chat owner leaving the chat.

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

    .. versionadded:: 22.7

    Args:
        new_owner (:class:`telegram.User`, optional): The user which will be the new owner of the
            chat if the previous owner does not return to the chat

    Attributes:
        new_owner (:class:`telegram.User`): Optional. The user which will be the new owner of the
            chat if the previous owner does not return to the chat

    r   Nr   r   r   c                x    t         |   |       || _        | j                  f| _        | j	                          y r   r   r   s      r   r   zChatOwnerLeft.__init__]   s3     	J/&/..*r   r   r   r   r   c                     | j                  |      }t        |j                  d      t        |      |d<   t        |   ||      S r    r!   r%   s      r   r$   zChatOwnerLeft.de_jsonj   r'   r   r(   r)   r1   s   @r   r3   r3   I   sf    " I "& '+	$; tO	 38 3, 3/ 3 3r   r3   N)r-   typingr   telegram._telegramobjectr   telegram._userr   telegram._utils.argumentparsingr   telegram._utils.typesr   telegramr   r
   r3    r   r   <module>r=      s9   & V   3  < *&3~ &3R(3N (3r   