o
    -˜Žj  ã                   @   s6   d dl mZmZ d dlZd dlmZ G dd„ dƒZdS )é    )ÚOptionalÚUnionN)Úrawc                   @   s2   e Zd Z	ddddeeeef  defdd„ZdS )	ÚGetStarsBalanceNÚselfzpyrogram.ClientÚchat_idÚreturnc                 Ã   sJ   �|du rt j ¡ }n|  |¡I dH }|  t jjj|d�¡I dH }|jj	S )a·  Get the current Telegram Stars balance of the current account.

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

        Parameters:
            chat_id (``int`` | ``str``, *optional*):
                Unique identifier (int) or username (str) of the target chat.
                For your personal cloud (Saved Messages) you can simply use "me" or "self".

        Returns:
            ``int``: On success, the current stars balance is returned.

        Example:
            .. code-block:: python

                # Get stars balance
                app.get_stars_balance()

                # Get stars balance of a bot
                app.get_stars_balance(chat_id="pyroforkbot")
        N)Úpeer)
r   ÚtypesÚInputPeerSelfÚresolve_peerÚinvokeÚ	functionsÚpaymentsÚGetStarsStatusÚbalanceÚamount)r   r   r	   Úr© r   úh/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/payments/get_stars_balance.pyÚget_stars_balance   s   €ÿ
ÿz!GetStarsBalance.get_stars_balance)N)Ú__name__Ú
__module__Ú__qualname__r   r   ÚintÚstrr   r   r   r   r   r      s    þÿþýr   )Útypingr   r   Úpyrogramr   r   r   r   r   r   Ú<module>   s   