
    N[i                     8    d dl mZ d dlZd dlmZ  G d d      Zy)    )UnionN)rawc                   .    e Zd Zdddeeef   dedefdZy)SetChatDescriptionselfzpyrogram.Clientchat_iddescriptionreturnc                 d  K   | j                  |       d{   }t        |t        j                  j                  t        j                  j
                  f      rC| j                  t        j                  j                  j                  ||             d{    yt        d| d      7 7 w)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.

            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   s       ^/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/chats/set_chat_description.pyset_chat_descriptionz'SetChatDescription.set_chat_description   s     8 &&w//dSYY779P9PQR++&&44% 5     }WI5HIJJ 0s"   B0B,A?B0B.B0.B0N)__name__
__module____qualname__r   intstrboolr        r   r   r      s3    ((sCx( ( 
	(r!   r   )typingr   pyrogramr   r   r    r!   r   <module>r$      s   &   ) )r!   