
    YPi                     n    d Z ddlZddlmZmZ ddlmZ ddlm	Z	m
Z
 ddlmZ erddlmZ  G d d	e      Zy)
zRThis module contains an object that represents a Telegram Prepared inline Message.    N)TYPE_CHECKINGOptional)TelegramObject)extract_tzinfo_from_defaultsfrom_timestamp)JSONDict)Botc                   ~     e Zd ZdZdZdddedej                  dee	   f fdZ
edd	e	d
ed   dd f fd       Z xZS )PreparedInlineMessagea  Describes an inline message to be sent by a user of a Mini App.

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

    .. versionadded:: 21.8

    Args:
        id (:obj:`str`): Unique identifier of the prepared message
        expiration_date (:class:`datetime.datetime`): Expiration date of the prepared message.
            Expired prepared messages can no longer be used.
            |datetime_localization|

    Attributes:
        id (:obj:`str`): Unique identifier of the prepared message
        expiration_date (:class:`datetime.datetime`): Expiration date of the prepared message.
            Expired prepared messages can no longer be used.
            |datetime_localization|
    )expiration_dateidN
api_kwargsr   r   r   c                    t         |   |       || _        || _        | j                  f| _        | j                          y )Nr   )super__init__r   r   	_id_attrs_freeze)selfr   r   r   	__class__s       \/root/twitch_bot/venv/lib/python3.12/site-packages/telegram/_inline/preparedinlinemessage.pyr   zPreparedInlineMessage.__init__7   s:     	J/-<''    databotr	   returnc                     | j                  |      }t        |      }t        |j                  d      |      |d<   t        |   ||      S )z,See :meth:`telegram.TelegramObject.de_json`.r   )tzinfo)r   r   )_parse_datar   r   getr   de_json)clsr   r   
loc_tzinfor   s       r   r    zPreparedInlineMessage.de_jsonF   sO     t$ 2#6
"0:K1LU_"`wDc22r   )N)__name__
__module____qualname____doc__	__slots__strdtmdatetimer   r   r   classmethodr    __classcell__)r   s   @r   r   r       sl    ( *I *. 
 X& 38 3(5/ 3E\ 3 3r   r   )r&   r*   r)   typingr   r   telegram._telegramobjectr   telegram._utils.datetimer   r   telegram._utils.typesr   telegramr	   r    r   r   <module>r3      s,   & Y  * 3 Q */3N /3r   