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 )é    )ÚOptionalN)ÚerrorsÚrawc                	   @   s.   e Zd Z	d	dddedee defdd„ZdS )
ÚUpgradeGiftNÚselfzpyrogram.ClientÚ
message_idÚkeep_detailsÚreturnc              	   Ã   sž   �z|   tjjjtjj|d�|d�¡I dH  W dS  tjyN   tjj	tjj|d�|d�}|   tjjj
|d�¡I dH }|   tjjj|j|d�¡I dH  Y dS w )a  Upgrade star gift to unique.

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

        Parameters:
            message_id (``int``):
                Unique message identifier of star gift.

            keep_details (``bool``):
                Pass True if you want to keep the original details of the gift like caption.

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

        Example:
            .. code-block:: python

                # Upgrade gift
                app.upgrade_gift(message_id=123)
        )Úmsg_id)ÚstargiftÚkeep_original_detailsN)Úinvoice)Úform_idr   T)Úinvoker   Ú	functionsÚpaymentsÚUpgradeStarGiftÚtypesÚInputSavedStarGiftUserr   ÚPaymentRequiredÚInputInvoiceStarGiftUpgradeÚGetPaymentFormÚSendStarsFormr   )r   r   r   r   Úform© r   úc/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/payments/upgrade_gift.pyÚupgrade_gift   s>   €ÿüÿëÿüÿ
ÿþÿëzUpgradeGift.upgrade_gift)N)Ú__name__Ú
__module__Ú__qualname__Úintr   Úboolr   r   r   r   r   r      s    ýÿþýür   )Útypingr   Úpyrogramr   r   r   r   r   r   r   Ú<module>   s   