o
    "h	                     @   s\   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 deZd	S )
z;This module contains an object related to a Telegram Story.    )TYPE_CHECKINGOptional)Chat)TelegramObject)JSONDict)Botc                	       sd   e Zd ZdZdZdddededee ddf fd	d
Z	e
ddeded dd f fddZ  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                   s4   t  j|d || _|| _| j| jf| _|   d S )Nr   )super__init__r	   r
   	_id_attrs_freeze)selfr	   r
   r   	__class__ B/var/www/html/venv/lib/python3.10/site-packages/telegram/_story.pyr   :   s
   zStory.__init__databotr   c                    s2   |  |}t|di ||d< t j||dS )z,See :meth:`telegram.TelegramObject.de_json`.r	   )r   r   )_parse_datar   de_jsongetr   )clsr   r   r   r   r   r   I   s   
zStory.de_json)N)__name__
__module____qualname____doc__	__slots__r   intr   r   r   classmethodr   __classcell__r   r   r   r   r      s    
*r   N)r    typingr   r   telegram._chatr   telegram._telegramobjectr   telegram._utils.typesr   telegramr   r   r   r   r   r   <module>   s   