L i.dZddlZddlmZddlmZmZddlm Z ddl m Z m Z ddl mZddlmZdd lmZmZmZdd lmZmZdd lmZerdd lmZGd deZGddeZy)zQThis module contains an object that represents a Telegram MessageReaction Update.N)Sequence) TYPE_CHECKINGOptional)Chat) ReactionCount ReactionType)TelegramObject)User)de_json_optionalde_list_optionalparse_sequence_arg)extract_tzinfo_from_defaultsfrom_timestamp)JSONDict)Botc eZdZdZdZdddededejde e d e e f fd Z edd e d e d ddffd ZxZS)MessageReactionCountUpdatedaUThis class represents reaction changes on a message with anonymous reactions. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if the :attr:`chat`, :attr:`message_id`, :attr:`date` and :attr:`reactions` is equal. .. versionadded:: 20.8 Args: chat (:class:`telegram.Chat`): The chat containing the message. message_id (:obj:`int`): Unique message identifier inside the chat. date (:class:`datetime.datetime`): Date of the change in Unix time |datetime_localization| reactions (Sequence[:class:`telegram.ReactionCount`]): List of reactions that are present on the message Attributes: chat (:class:`telegram.Chat`): The chat containing the message. message_id (:obj:`int`): Unique message identifier inside the chat. date (:class:`datetime.datetime`): Date of the change in Unix time |datetime_localization| reactions (tuple[:class:`telegram.ReactionCount`]): List of reactions that are present on the message )chatdate message_id reactionsN api_kwargsrrrrrct||||_||_||_t ||_|j|j|j|j f|_|jyNr) super__init__rrrr r _id_attrs_freeze)selfrrrrr __class__s f/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_messagereactionupdated.pyrz$MessageReactionCountUpdated.__init__Fs_ J/ )"& 4Fy4Q))T__diiP databotrreturnc(|j|}t|}t|jd||d<t |jdt ||d<t |jdt||d<t|%||S),See :meth:`telegram.TelegramObject.de_json`.rtzinforrr$r%) _parse_datarrgetr rr rrde_jsonclsr$r% loc_tzinfor!s r"r.z#MessageReactionCountUpdated.de_jsonYst$2#6 %dhhv&6zJV '(8$DV ,TXXk-BMSVW[wDc22r#N)__name__ __module__ __qualname____doc__ __slots__rintdtmdatetimerrrrr classmethodr. __classcell__r!s@r"rr%s2I*.ll  M* X&& 38 3(5/ 3Eb 3 3r#rceZdZdZdZ ddddededejde e d e e d e e d e ed e e ffd Zedde de dddffd ZxZS)MessageReactionUpdatedaThis class represents a change of a reaction on a message performed by a user. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if the :attr:`chat`, :attr:`message_id`, :attr:`date`, :attr:`old_reaction` and :attr:`new_reaction` is equal. .. versionadded:: 20.8 Args: chat (:class:`telegram.Chat`): The chat containing the message. message_id (:obj:`int`): Unique message identifier inside the chat. date (:class:`datetime.datetime`): Date of the change in Unix time. |datetime_localization| old_reaction (Sequence[:class:`telegram.ReactionType`]): Previous list of reaction types that were set by the user. new_reaction (Sequence[:class:`telegram.ReactionType`]): New list of reaction types that were set by the user. user (:class:`telegram.User`, optional): The user that changed the reaction, if the user isn't anonymous. actor_chat (:class:`telegram.Chat`, optional): The chat on behalf of which the reaction was changed, if the user is anonymous. Attributes: chat (:class:`telegram.Chat`): The chat containing the message. message_id (:obj:`int`): Unique message identifier inside the chat. date (:class:`datetime.datetime`): Date of the change in Unix time. |datetime_localization| old_reaction (tuple[:class:`telegram.ReactionType`]): Previous list of reaction types that were set by the user. new_reaction (tuple[:class:`telegram.ReactionType`]): New list of reaction types that were set by the user. user (:class:`telegram.User`): Optional. The user that changed the reaction, if the user isn't anonymous. actor_chat (:class:`telegram.Chat`): Optional. The chat on behalf of which the reaction was changed, if the user is anonymous. ) actor_chatrrr new_reaction old_reactionuserNrrrrrBrArCr@rcHt ||||_||_||_t ||_t ||_||_||_ |j|j|j|j |jf|_ |jyr) rrrrrr rBrArCr@rr) r rrrrBrArCr@rr!s r"rzMessageReactionUpdated.__init__s J/ )"& 6H6V6H6V%) *4 II OO II         r#r$r%rr&c|j|}t|}t|jd||d<t |jdt ||d<t |jdt||d<t |jdt||d<t |jdt||d<t |jdt ||d<t|)||S) r(rr)rrBrArCr@r+) r,rrr-r rr rr rr.r/s r"r.zMessageReactionUpdated.de_jsonst$2#6 %dhhv&6zJV '(8$DV /0H,X[\^/0H,X[\^'(8$DV -dhh|.DdCP\wDc22r#)NNr2)r3r4r5r6r7rr8r9r:rrrr rrr;r.r<r=s@r"r?r?hs#JI" $%)*.ll  |,  |, tnTNX&B383(5/3E]33r#r?)r6r:r9collections.abcrtypingrrtelegram._chatrtelegram._reactionrrtelegram._telegramobjectr telegram._userr telegram._utils.argumentparsingr r r telegram._utils.datetimerrtelegram._utils.typesrtelegramrrr?r#r"rQsO&X$*:3bbQ*@3.@3F`3^`3r#