
    YPi                         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 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 G d de
      Zy)zEThis module contains objects that represents a Telegram ReactionType.    )TYPE_CHECKINGFinalLiteralOptionalUnion)	constants)TelegramObject)enum)de_json_optional)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<   	 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deded   dd f fd       Z xZS )ReactionTypea  Base class for Telegram ReactionType Objects.
    There exist :class:`telegram.ReactionTypeEmoji`, :class:`telegram.ReactionTypeCustomEmoji`
    and :class:`telegram.ReactionTypePaid`.

    .. versionadded:: 20.8
    .. versionchanged:: 21.5

        Added paid reaction.

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

    )typeEMOJICUSTOM_EMOJIPAIDN
api_kwargsr   )emojicustom_emojipaidr   c                    t         |   |       t        j                  t        j
                  ||      | _        | j                          y Nr   )super__init__r
   
get_memberr   r   r   _freeze)selfr   r   	__class__s      H/root/twitch_bot/venv/lib/python3.12/site-packages/telegram/_reaction.pyr   zReactionType.__init__B   s8     	J/)?)?tL	    databotr   returnc                 *   | j                  |      }| j                  t        | j                  t        | j
                  t        i}| t        u r7|j                  d      |v r$||j                  d         j                  ||      S t        | )  ||      S z,See :meth:`telegram.TelegramObject.de_json`.r   )r#   r$   )_parse_datar   ReactionTypeEmojir   ReactionTypeCustomEmojir   ReactionTypePaidr   getpopde_jsonr   )clsr#   r$   _class_mappingr    s       r!   r.   zReactionType.de_jsonP   s     t$ II(5HH&9
 ,488F#3~#E!$((6"23;;D#FFwDc22r"   N)__name__
__module____qualname____doc__	__slots__r   r   r   r   __annotations__r   r   r   r   r   r   r   classmethodr.   __classcell__r    s   @r!   r   r   !   s    ( I+4+A+A+G+GE5''(G82;2H2H2U2UL%	../U?*3*@*@*E*ED%	&&
'E *.34i6L6LL
 X& 38 3(5/ 3^ 3 3r"   r   c                   <     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                  |       | j	                         5  || _        | j
                  f| _        d d d        y # 1 sw Y   y xY wN)r   r   )r   r   r   r   	_unfrozenr   	_id_attrs)r   r   r   r    s      r!   r   zReactionTypeEmoji.__init__w   sP     	l00ZH^^ 	+#DJ"jj]DN	+ 	+ 	+   AA
r2   r3   r4   r5   r6   strr   r   r   r9   r:   s   @r!   r)   r)   a   s5    & I *.	
+
+ X&	
+ 
+r"   r)   c                   <     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   rD   r   c                    t         |   t        j                  |       | j	                         5  || _        | j
                  f| _        d d d        y # 1 sw Y   y xY wr=   )r   r   r   r   r>   rD   r?   )r   rD   r   r    s      r!   r   z ReactionTypeCustomEmoji.__init__   sT     	l77JO^^ 	5(7D "224DN	5 	5 	5r@   rA   r:   s   @r!   r*   r*      s5    $ %I *.	
5
5 X&	
5 
5r"   r*   c                   8     e Zd ZdZdZdddee   f fdZ xZS )r+   z
    The reaction is paid.

    .. versionadded:: 21.5

    Attributes:
        type (:obj:`str`): Type of the reaction,
            always :tg-const:`telegram.ReactionType.PAID`.
     Nr   r   c                d    t         |   t        j                  |       | j	                          y r=   )r   r   r   r   r   )r   r   r    s     r!   r   zReactionTypePaid.__init__   s$    l//JGr"   )	r2   r3   r4   r5   r6   r   r   r   r9   r:   s   @r!   r+   r+      s(     I;? hx&8  r"   r+   c                   j     e Zd ZdZdZdddededee   f fdZ	e
dd	ed
ed   d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   rK   r   c                    t         |   |       || _        || _        | j                  | j                  f| _        | j                          y r   )r   r   r   rK   r?   r   )r   r   rK   r   r    s       r!   r   zReactionCount.__init__   sJ     	J/"&	 + II
 	r"   r#   r$   r   r%   c                     | j                  |      }t        |j                  d      t        |      |d<   t        |   ||      S r'   )r(   r   r,   r   r   r.   )r/   r#   r$   r    s      r!   r.   zReactionCount.de_json   sA     t$'(8,LVwDc22r"   r1   )r2   r3   r4   r5   r6   r   intr   r   r   r8   r.   r9   r:   s   @r!   rJ   rJ      sg    "I *. 
 X&$ 38 3(5/ 3_ 3 3r"   rJ   N)r5   typingr   r   r   r   r   telegramr   telegram._telegramobjectr	   telegram._utilsr
   telegram._utils.argumentparsingr   telegram._utils.typesr   r   r   r)   r*   r+   rJ   rG   r"   r!   <module>rU      se   & L A A  3   < *=3> =3@ +  +F5l 5D| $03N 03r"   