
    i                         d Z ddlmZmZmZmZmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ erddlmZ  G d d	e
          Z G d
 de          Z G d de          Z G d de
          ZdS )zEThis module contains objects that represents a Telegram ReactionType.    )TYPE_CHECKINGFinalLiteralOptionalUnion)	constants)TelegramObject)enum)JSONDict)Botc                       e Zd ZU dZdZej        j        Zeej                 e	d<   	 ej        j
        Z
eej                 e	d<   	 dddeed         ej        f         d	ee         f fd
Zedee         ddded          f fd            Z xZS )ReactionTypea  Base class for Telegram ReactionType Objects.
    There exist :class:`telegram.ReactionTypeEmoji` and :class:`telegram.ReactionTypeCustomEmoji`.

    .. versionadded:: 20.8

    Args:
        type (:obj:`str`): Type of the reaction. Can be
            :attr:`~telegram.ReactionType.EMOJI` or :attr:`~telegram.ReactionType.CUSTOM_EMOJI`.
    Attributes:
        type (:obj:`str`): Type of the reaction. Can be
            :attr:`~telegram.ReactionType.EMOJI` or :attr:`~telegram.ReactionType.CUSTOM_EMOJI`.

    )typeEMOJICUSTOM_EMOJIN
api_kwargsr   )emojicustom_emojir   c                    t                                          |           t          j        t          j        ||          | _        |                                  d S Nr   )super__init__r
   
get_memberr   r   r   _freeze)selfr   r   	__class__s      X/var/www/html/crypto-bot/backend/venv/lib/python3.11/site-packages/telegram/_reaction.pyr   zReactionType.__init__5   sI     	J///)?tLL	    databotr   returnc                    |                      |          }|sdS | t          u r{|                    d          | j        | j        fv rX|                    d          }|| j        k    rt                              ||          S t                              ||          S t                                          ||          S z,See :meth:`telegram.TelegramObject.de_json`.Nr   )r    r!   )
_parse_datar   getr   r   popReactionTypeEmojide_jsonReactionTypeCustomEmojir   )clsr    r!   reaction_typer   s       r   r)   zReactionType.de_jsonC   s     t$$ 	4,488F#3#3	3CS7T#T#T HHV,,M	))(00d0DDD*22#2FFFwwDc222r   )__name__
__module____qualname____doc__	__slots__r   r   r   r   __annotations__r   r   r   r   r   r   classmethodr)   __classcell__r   s   @r   r   r      s          I+4+A+GE5'(GGG82;2H2UL%	./UUU? *.  +,i.DD
 X&      38H- 3E 3h~>V 3 3 3 3 3 [3 3 3 3 3r   r   c                   B     e Zd ZdZdZdddedee         f fdZ xZ	S )r(   aP  
    Represents a reaction with a normal emoji.

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

    .. versionadded:: 20.8

    Args:
        emoji (:obj:`str`): Reaction emoji. It can be one of
            :const:`telegram.constants.ReactionEmoji`.

    Attributes:
        type (:obj:`str`): Type of the reaction,
            always :tg-const:`telegram.ReactionType.EMOJI`.
        emoji (:obj:`str`): Reaction emoji. It can be one of
        :const:`telegram.constants.ReactionEmoji`.
    )r   Nr   r   r   c                    t                                          t          j        |           |                                 5  || _        | j        f| _        d d d            d S # 1 swxY w Y   d S N)r   r   )r   r   r   r   	_unfrozenr   	_id_attrs)r   r   r   r   s      r   r   zReactionTypeEmoji.__init__j   s     	l0ZHHH^^ 	+ 	+#DJ"j]DN	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+   A%%A),A)
r-   r.   r/   r0   r1   strr   r   r   r4   r5   s   @r   r(   r(   T   st         & I *.	
+ 
+ 
+
+ X&	
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+r   r(   c                   B     e Zd ZdZdZdddedee         f fdZ xZ	S )r*   a  
    Represents a reaction with a custom emoji.

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

    .. versionadded:: 20.8

    Args:
        custom_emoji_id (:obj:`str`): Custom emoji identifier.

    Attributes:
        type (:obj:`str`): Type of the reaction,
            always :tg-const:`telegram.ReactionType.CUSTOM_EMOJI`.
        custom_emoji_id (:obj:`str`): Custom emoji identifier.

    )custom_emoji_idNr   r?   r   c                    t                                          t          j        |           |                                 5  || _        | j        f| _        d d d            d S # 1 swxY w Y   d S r8   )r   r   r   r   r9   r?   r:   )r   r?   r   r   s      r   r   z ReactionTypeCustomEmoji.__init__   s     	l7JOOO^^ 	5 	5(7D "24DN	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5r;   r<   r5   s   @r   r*   r*   w   st         $ %I *.	
5 
5 
5
5 X&	
5 
5 
5 
5 
5 
5 
5 
5 
5 
5r   r*   c                        e Zd ZdZdZdddededee         f fdZ	e
d	ee         d
dded          f fd            Z xZS )ReactionCountai  This class represents a reaction added to a message along with the number of times it was
    added.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if the :attr:`type` and :attr:`total_count` is equal.

    .. versionadded:: 20.8

    Args:
        type (:class:`telegram.ReactionType`): Type of the reaction.
        total_count (:obj:`int`): Number of times the reaction was added.

    Attributes:
        type (:class:`telegram.ReactionType`): Type of the reaction.
        total_count (:obj:`int`): Number of times the reaction was added.
    )total_countr   Nr   r   rC   r   c                    t                                          |           || _        || _        | j        | j        f| _        |                                  d S r   )r   r   r   rC   r:   r   )r   r   rC   r   r   s       r   r   zReactionCount.__init__   sX     	J///"&	 + I
 	r   r    r!   r   r"   c                     |                      |          }|sdS t                              |                    d          |          |d<   t	                                          ||          S r$   )r%   r   r)   r&   r   )r+   r    r!   r   s      r   r)   zReactionCount.de_json   sb     t$$ 	4#++DHHV,<,<cBBVwwDc222r   )r-   r.   r/   r0   r1   r   intr   r   r   r3   r)   r4   r5   s   @r   rB   rB      s         "I *.   
 X&     $ 	38H- 	3E 	3h>W 	3 	3 	3 	3 	3 [	3 	3 	3 	3 	3r   rB   N)r0   typingr   r   r   r   r   telegramr   telegram._telegramobjectr	   telegram._utilsr
   telegram._utils.typesr   r   r   r(   r*   rB    r   r   <module>rM      sO  & L K A A A A A A A A A A A A A A       3 3 3 3 3 3             * * * * * * 23 23 23 23 23> 23 23 23j +  +  +  +  +  +  +  +F5 5 5 5 5l 5 5 5D33 33 33 33 33N 33 33 33 33 33r   