
    i                     z    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
mZmZ erddlmZ  G d d	e          Zd
S )z;This module contains an object related to a Telegram Story.    )TYPE_CHECKING)Chat)TelegramObject)DEFAULT_NONE)JSONDictODVInput
TimePeriod)Botc                        e Zd ZdZdZdddedededz  ddf fd	Ze	dd
edddd f fd            Z
defeeeedddedededz  dee         dee         dee         dee         dee         dedz  dd 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| _        |                                  d S )Nr   )super__init__r   r   	_id_attrs_freeze)selfr   r   r   	__class__s       O/Users/shanyulin/my-agent/.venv/lib/python3.11/site-packages/telegram/_story.pyr   zStory.__init__;   sO     	J///	)TW-    databotz
Bot | Nonec                     |                      |          }t          j        |                    di           |          |d<   t	                                          ||          S )z,See :meth:`telegram.TelegramObject.de_json`.r   )r   r   )_parse_datar   de_jsongetr   )clsr   r   r   s      r   r   zStory.de_jsonJ   sS     t$$|DHHVR$8$8#>>VwwDc222r   )read_timeoutwrite_timeoutconnect_timeoutpool_timeoutr   business_connection_idactive_periodpost_to_chat_pageprotect_contentr"   r#   r$   r%   c                   K   |                                                      || j        j        | j        ||||||||	           d{V S )a  Shortcut for::

             await bot.repost_story(
                from_chat_id=story.chat.id,
                from_story_id=story.id,
                *args, **kwargs
            )

        For the documentation of the arguments, please see :meth:`telegram.Bot.repost_story`.

        .. versionadded:: 22.6

        Returns:
            :class:`Story`: On success, :class:`Story` is returned.

        )r&   from_chat_idfrom_story_idr'   r(   r)   r"   r#   r$   r%   r   N)get_botrepost_storyr   r   )
r   r&   r'   r(   r)   r"   r#   r$   r%   r   s
             r   repostzStory.repostR   sr      : \\^^00#9''/+%'+%! 1 
 
 
 
 
 
 
 
 	
r   )N)__name__
__module____qualname____doc__	__slots__r   intr   r   classmethodr   r   strr	   boolr   floatr/   __classcell__)r   s   @r   r   r       s        *I '+   
 tO 
      3 38 3, 3' 3 3 3 3 3 [3 *.*6)
 )5)5+7(4&*)
 )
 )
 #)
 ")
  $;	)

 "$)
 uo)
  )
 "%)
 uo)
 tO)
 
)
 )
 )
 )
 )
 )
 )
 )
r   r   N)r3   typingr   telegram._chatr   telegram._telegramobjectr   telegram._utils.defaultvaluer   telegram._utils.typesr   r   r	   telegramr
   r    r   r   <module>rB      s   & B A                   3 3 3 3 3 3 5 5 5 5 5 5 @ @ @ @ @ @ @ @ @ @ [
 [
 [
 [
 [
N [
 [
 [
 [
 [
r   