o
    -˜Žj  ã                   @   s6   d dl mZ d dlZd dlmZmZ G dd„ dƒZdS )é    )ÚUnionN)ÚrawÚtypesc                   @   s:   e Zd Z	ddddeeef dedededd	fd
d„ZdS )ÚSendPaidReactionNÚselfzpyrogram.ClientÚchat_idÚ
message_idÚamountÚ	anonymousÚreturnztypes.MessageReactionsc           	   	   Ã   sŒ   �|   tjjj|  |¡I dH |||  ¡ |d�¡I dH }dd„ |jD ƒ}dd„ |jD ƒ}|j	D ]}t
|tjjƒrCtj | |j||¡  S q.dS )a  Use this method to send paid reactions on a channel message.

        .. include:: /_includes/usable-by/users.rst

        Parameters:
            chat_id (``int`` | ``str``):
                Unique identifier (int) or username (str) of the target chat.
                You can also use chat public link in form of *t.me/<username>* (str).

            message_id (``int``):
                Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.

            amount (``int``):
                Amount of stars to send.

            anonymous (``bool``, *optional*):
                Pass True to hide yourself from top senders list.

        Returns:
            :obj:`~pyrogram.types.MessageReactions`: On success, MessageReactions is returned.

        Example:
            .. code-block:: python

                # Send a paid reaction
                await app.send_paid_reaction(chat_id, message_id=message_id, amount=5)
        N)ÚpeerÚmsg_idÚcountÚ	random_idÚprivatec                 S   ó   i | ]}|j |“qS © ©Úid©Ú.0Úir   r   úi/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/payments/send_paid_reaction.pyÚ
<dictcomp>F   ó    z7SendPaidReaction.send_paid_reaction.<locals>.<dictcomp>c                 S   r   r   r   r   r   r   r   r   G   r   )Úinvoker   Ú	functionsÚmessagesr   Úresolve_peerÚrnd_idÚusersÚchatsÚupdatesÚ
isinstancer   ÚUpdateMessageReactionsÚMessageReactionsÚ_parseÚ	reactions)	r   r   r   r	   r
   Úrr    r!   r   r   r   r   Úsend_paid_reaction   s"   €"û
ÿ	
ÿÿz#SendPaidReaction.send_paid_reaction)N)Ú__name__Ú
__module__Ú__qualname__r   ÚintÚstrÚboolr)   r   r   r   r   r      s    ûÿ
þýüûúr   )Útypingr   Úpyrogramr   r   r   r   r   r   r   Ú<module>   s   