U
    ;g                     @   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eeef eedddZdS )SetChatDescriptionzpyrogram.Client)selfchat_iddescriptionreturnc                    sZ   |  |I dH }t|tjjtjjfrF| tjjj	||dI dH  nt
d| ddS )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)peerZaboutzThe chat_id "z" belongs to a userT)Zresolve_peer
isinstancer   typesZInputPeerChannelZInputPeerChatZinvokeZ	functionsmessagesZEditChatAbout
ValueError)r   r   r   r	    r   k/opt/bot/vods_filmes/script/venv/lib/python3.8/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   Zpyrogramr   r   r   r   r   r   <module>   s   