
    ՟f
                     b    d Z ddlmZ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y	)
z;This module contains an object related to a Telegram Story.    )TYPE_CHECKINGOptional)Chat)TelegramObject)JSONDict)Botc            	       z     e Zd ZdZdZdddededee   ddf fd	Z	e
dd
ee   ded   ded    f fd       Z xZS )Storya  
    This object represents a story.

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

    .. versionadded:: 20.5

    .. versionchanged:: 21.0
        Added attributes :attr:`chat` and :attr:`id` and equality based on them.

    Args:
        chat (:class:`telegram.Chat`): Chat that posted the story.
        id (:obj:`int`): Unique identifier for the story in the chat.

    Attributes:
        chat (:class:`telegram.Chat`): Chat that posted the story.
        id (:obj:`int`): Unique identifier for the story in the chat.

    )chatidN
api_kwargsr   r   r   returnc                    t         |   |       || _        || _        | j                  | j                  f| _        | j                          y )Nr   )super__init__r   r   	_id_attrs_freeze)selfr   r   r   	__class__s       J/var/www/cvtools/html/venv/lib/python3.12/site-packages/telegram/_story.pyr   zStory.__init__:   s@     	J/	))TWW-    databotr   c                     | j                  |      }|syt        j                  |j                  di       |      |d<   t        | 	  ||      S )z,See :meth:`telegram.TelegramObject.de_json`.Nr   )r   r   )_parse_datar   de_jsongetr   )clsr   r   r   s      r   r   zStory.de_jsonI   sK     t$||DHHVR$8#>VwDc22r   )N)__name__
__module____qualname____doc__	__slots__r   intr   r   r   classmethodr   __classcell__)r   s   @r   r
   r
      s|    *I *. 
 X& 
 38H- 3HUO 3xX_O` 3 3r   r
   N)r#   typingr   r   telegram._chatr   telegram._telegramobjectr   telegram._utils.typesr   telegramr   r
    r   r   <module>r.      s)   & B *  3 *33N 33r   