
    Ii                         S r SSKJr  SSKJrJrJrJr  SSKJr  SSK	J
r
Jr  SSKJr  SSKJr  SSKJr  SS	KJrJr  SS
KJr  \(       a  SSKJr   " S S\5      r " S S\5      rg)zQThis module contains an object that represents a Telegram MessageReaction Update.    )datetime)TYPE_CHECKINGOptionalSequenceTuple)Chat)ReactionCountReactionType)TelegramObject)User)parse_sequence_arg)extract_tzinfo_from_defaultsfrom_timestamp)JSONDict)Botc                      ^  \ rS rSrSrSrSS.S\S\S\S	\	\
   S
\\   4
U 4S jjjr\S\\   SSS\S    4U 4S jj5       rSrU =r$ )MessageReactionCountUpdated#   a	  This 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
)chatdate
message_id	reactionsN
api_kwargsr   r   r   r   r   c                   > [         TU ]  US9  Xl        X l        X0l        [        U5      U l        U R                  U R                  U R                  U R                  4U l        U R                  5         g Nr   )	super__init__r   r   r   r   r   	_id_attrs_freeze)selfr   r   r   r   r   	__class__s         F/venv/lib/python3.13/site-packages/telegram/_messagereactionupdated.pyr   $MessageReactionCountUpdated.__init__D   sY     	J/	)"	4Fy4Q))T__diiP    databotr   returnc                 B  > U R                  U5      nU(       d  g[        U5      n[        UR                  S5      US9US'   [        R
                  " UR                  S5      U5      US'   [        R                  " UR                  S5      U5      US'   [        TU ]  XS9$ ),See :meth:`telegram.TelegramObject.de_json`.Nr   tzinfor   r   r&   r'   )	_parse_datar   r   getr   de_jsonr	   de_listr   clsr&   r'   
loc_tzinfor"   s       r#   r0   #MessageReactionCountUpdated.de_jsonW   s    
 t$ 2#6
%dhhv&6zJV||DHHV$4c:V)11$((;2GM[wD22r%   )r   r   r   r   r   )__name__
__module____qualname____firstlineno____doc__	__slots__r   intr   r   r	   r   r   r   classmethodr0   __static_attributes____classcell__r"   s   @r#   r   r   #   s    2I *.  	
 M* X& & 3H%3,13	/	03 3r%   r   c                      ^  \ rS rSrSrSr  SSS.S\S\S\S	\	\
   S
\	\
   S\\   S\\   S\\   4U 4S jjjjr\S\\   SSS\S    4U 4S jj5       rSrU =r$ )MessageReactionUpdatedk   a0  This 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_chatr   r   r   new_reactionold_reactionuserNr   r   r   r   rF   rE   rG   rD   r   c                8  > [         T	U ]  US9  Xl        X l        X0l        [        U5      U l        [        U5      U l        X`l        Xpl	        U R                  U R                  U R                  U R                  U R                  4U l
        U R                  5         g r   )r   r   r   r   r   r   rF   rE   rG   rD   r   r    )
r!   r   r   r   rF   rE   rG   rD   r   r"   s
            r#   r   MessageReactionUpdated.__init__   s     	J/	)"	6H6V6H6V %)	*4 IIOOII
 	r%   r&   r'   r   r(   c                 8  > U R                  U5      nU(       d  g[        U5      n[        UR                  S5      US9US'   [        R
                  " UR                  S5      U5      US'   [        R                  " UR                  S5      U5      US'   [        R                  " UR                  S5      U5      US'   [        R
                  " UR                  S5      U5      US'   [        R
                  " UR                  S5      U5      US'   [        TU ]  XS	9$ )
r*   Nr   r+   r   rF   rE   rG   rD   r-   )
r.   r   r   r/   r   r0   r
   r1   r   r   r2   s       r#   r0   MessageReactionUpdated.de_json   s     t$ 2#6
%dhhv&6zJV||DHHV$4c:V+33DHH^4LcR^+33DHH^4LcR^||DHHV$4c:V!\\$((<*@#F\wD22r%   )r   rD   r   r   r   rE   rF   rG   )NN)r6   r7   r8   r9   r:   r;   r   r<   r   r   r
   r   r   r   r   r=   r0   r>   r?   r@   s   @r#   rB   rB   k   s    #JI"  $%) *.  	
 |, |, tn TN X& B 38H- 3E 3hG_>` 3 3r%   rB   N)r:   r   typingr   r   r   r   telegram._chatr   telegram._reactionr	   r
   telegram._telegramobjectr   telegram._userr   telegram._utils.argumentparsingr   telegram._utils.datetimer   r   telegram._utils.typesr   telegramr   r   rB    r%   r#   <module>rV      sL   & X  ; ;  : 3  > Q *E3. E3Pc3^ c3r%   