o
    -˜Žjh	  ã                   @   s2   d dl mZ d dlZd dlmZ G dd„ dƒZdS )é    )ÚUnionN)Úrawc                   @   s.   e Zd Zdddeeef dedefdd„ZdS )	ÚSetChatDescriptionÚselfzpyrogram.ClientÚchat_idÚdescriptionÚreturnc                 Ã   sZ   �|   |¡I dH }t|tjjtjjfƒr%|  tjjj	||d�¡I dH  dS t
d|› d�ƒ‚)a@  Change the description of a supergroup or a channel.
        You must be an administrator in the chat for this to work and must have the appropriate admin rights.

        .. include:: /_includes/usable-by/users-bots.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).

            description (``str``):
                New chat description, 0-255 characters.

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

        Raises:
            ValueError: if a chat_id doesn't belong to a supergroup or a channel.

        Example:
            .. code-block:: python

                await app.set_chat_description(chat_id, "New Description")
        N)ÚpeerÚaboutzThe chat_id "z" belongs to a userT)Úresolve_peerÚ
isinstancer   ÚtypesÚInputPeerChannelÚInputPeerChatÚinvokeÚ	functionsÚmessagesÚEditChatAboutÚ
ValueError)r   r   r   r	   © r   úh/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/chats/set_chat_description.pyÚset_chat_description   s   €þ
ÿ	þz'SetChatDescription.set_chat_descriptionN)Ú__name__Ú
__module__Ú__qualname__r   ÚintÚstrÚboolr   r   r   r   r   r      s    ÿ
þýür   )Útypingr   Úpyrogramr   r   r   r   r   r   Ú<module>   s   