o
    Zzjq  ã                   @   sd   d Z ddlZddl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	„ d	eƒZdS )
zRThis module contains an object that represents a Telegram Prepared inline Message.é    N)ÚTYPE_CHECKING)ÚTelegramObject)Úextract_tzinfo_from_defaultsÚfrom_timestamp)ÚJSONDict)ÚBotc                       s^   e Zd ZdZdZddœdedejdedB f‡ fdd	„Z	e
dd
edddd f‡ fdd„ƒZ‡  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                   s0   t ƒ j|d� || _|| _| jf| _|  ¡  d S )Nr   )ÚsuperÚ__init__r
   r	   Ú	_id_attrsÚ_freeze)Úselfr
   r	   r   ©Ú	__class__© úa/var/www/kodo/tsheker/venv/lib/python3.10/site-packages/telegram/_inline/preparedinlinemessage.pyr   7   s
   
zPreparedInlineMessage.__init__ÚdataÚbotz
Bot | NoneÚreturnc                    s8   |   |¡}t|ƒ}t| d¡|d�|d< tƒ j||d�S )z,See :meth:`telegram.TelegramObject.de_json`.r	   )Útzinfo)r   r   )Ú_parse_datar   r   Úgetr   Úde_json)Úclsr   r   Ú
loc_tzinfor   r   r   r   F   s   
zPreparedInlineMessage.de_json)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__ÚstrÚdtmÚdatetimer   r   Úclassmethodr   Ú__classcell__r   r   r   r   r       s    ûþýû&r   )r"   r&   r%   Útypingr   Útelegram._telegramobjectr   Útelegram._utils.datetimer   r   Útelegram._utils.typesr   Útelegramr   r   r   r   r   r   Ú<module>   s   