o
    -˜ŽjÙ  ã                   @   sF   d dl mZmZmZ d dlZd dlmZmZmZmZ G dd„ dƒZ	dS )é    )ÚOptionalÚUnionÚListN)ÚrawÚtypesÚenumsÚutilsc                   @   sf   e Zd Z					ddddeeef dedee ded d	eed
  dee dee defdd„Z	dS )ÚSendGiftNÚselfzpyrogram.ClientÚchat_idÚgift_idÚtextÚ
parse_modezenums.ParseModeÚentitiesztypes.MessageEntityÚhide_my_nameÚpay_for_upgradeÚreturnc              	   Ã   sš   �|   |¡I dH }t | |||¡I dH  ¡ \}}tjj|||||r)tjj||d�ndd�}	|  tj	j
j|	d�¡I dH }
|  tj	j
j|
j|	d�¡I dH  dS )uQ  Send star gift.

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

        Parameters:
            chat_id (``int`` | ``str``):
                Unique identifier (int) or username (str) of the target chat.
                For your personal cloud (Saved Messages) you can simply use "me" or "self".
                For a contact that exists in your Telegram address book you can use his phone number (str).

            gift_id (``int``):
                Unique identifier of star gift.

            text (``str``, *optional*):
                Text of the message to be sent.

            parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
                By default, texts are parsed using both Markdown and HTML styles.
                You can combine both syntaxes together.

            entities (List of :obj:`~pyrogram.types.MessageEntity`, *optional*):
                List of special entities that appear in message text, which can be specified instead of *parse_mode*.

            hide_my_name (``bool``, *optional*):
                If True, your name will be hidden from visitors to the gift recipient's profile.
            
            pay_for_upgrade (``bool``, *optional*):
                If True, gift upgrade will be paid from the botâ€™s balance, thereby making the upgrade free for the receiver.
                For bots only.
                Defaults to None.

        Returns:
            ``bool``: On success, True is returned.

        Example:
            .. code-block:: python

                # Send gift
                app.send_gift(chat_id=chat_id, star_gift_id=123)
        N)r   r   )Úpeerr   Ú	hide_nameÚinclude_upgradeÚmessage)Úinvoice)Úform_idr   T)Úresolve_peerr   Úparse_text_entitiesÚvaluesr   r   ÚInputInvoiceStarGiftÚTextWithEntitiesÚinvokeÚ	functionsÚpaymentsÚGetPaymentFormÚSendStarsFormr   )r
   r   r   r   r   r   r   r   r   r   Úform© r$   ú`/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/payments/send_gift.pyÚ	send_gift   s,   €2ûÿ
ÿþ
ÿzSendGift.send_gift)NNNNN)
Ú__name__Ú
__module__Ú__qualname__r   ÚintÚstrr   r   Úboolr&   r$   r$   r$   r%   r	      s2    øÿ
þýüû
úùø	÷r	   )
Útypingr   r   r   Úpyrogramr   r   r   r   r	   r$   r$   r$   r%   Ú<module>   s   