Ë
    N[Îiø  ã                   ó<   — d dl mZmZ d dlZd dlmZ  G d„ d«      Zy)é    )ÚUnionÚOptionalN)Úrawc                   ó4   — e Zd Zdddeeef   dee   defd„Zy)ÚSetChatUsernameÚselfzpyrogram.ClientÚchat_idÚusernameÚreturnc           	   ƒ   óH  K  — | j                  |«      ƒ d{  –—† }t        |t        j                  j                  «      rOt        | j                  t        j                  j                  j                  ||xs d¬«      «      ƒ d{  –—† «      S t        d|› d«      ‚7 Œ†7 Œ­w)aî  Set a channel or a supergroup username.

        To set your own username (for users only, not bots) you can use :meth:`~pyrogram.Client.set_username`.

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

        Parameters:
            chat_id (``int`` | ``str``)
                Unique identifier (int) or username (str) of the target chat.

            username (``str`` | ``None``):
                Username to set. Pass "" (empty string) or None to remove the username.

        Returns:
            ``bool``: True on success.

        Raises:
            ValueError: In case a chat id belongs to a user or chat.

        Example:
            .. code-block:: python

                await app.set_chat_username(chat_id, "new_username")
        NÚ )Úchannelr
   zThe chat_id "z" belongs to a user or chat)Úresolve_peerÚ
isinstancer   ÚtypesÚInputPeerChannelÚboolÚinvokeÚ	functionsÚchannelsÚUpdateUsernameÚ
ValueError)r   r	   r
   Úpeers       ú[/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/chats/set_chat_username.pyÚset_chat_usernamez!SetChatUsername.set_chat_username   s–   è ø€ ð< ×&Ñ& wÓ/×/ˆädœCŸI™I×6Ñ6Ô7ÜØ—k‘kÜ—M‘M×*Ñ*×9Ñ9Ø $Ø!)¢¨Rð :ó ó÷ óð ô ˜}¨W¨IÐ5PÐQÓRÐRð 0øðús"   ‚B"—B˜A.B"ÂB ÂB"Â B"N)	Ú__name__Ú
__module__Ú__qualname__r   ÚintÚstrr   r   r   © ó    r   r   r      s<   „ ð*SØð*Sàs˜Cx‘ð*Sð ˜3‘-ð*Sð 
ô	*Sr"   r   )Útypingr   r   Úpyrogramr   r   r!   r"   r   ú<module>r%      s   ð÷& #ã Ý ÷+Sò +Sr"   