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dddZdS )DeleteChatPhotozpyrogram.Client)selfchat_idreturnc                    s   |  |I dH }t|tjjrF| tjjj|j	tj
 dI dH  nDt|tjjrz| tjjj|tj
 dI dH  ntd| ddS )a=  Delete a chat photo.

        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.

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

        Raises:
            ValueError: if a chat_id belongs to user.

        Example:
            .. code-block:: python

                await app.delete_chat_photo(chat_id)
        N)r   photo)Zchannelr   zThe chat_id "z" belongs to a userT)Zresolve_peer
isinstancer   typesZInputPeerChatZinvokeZ	functionsmessagesZEditChatPhotor   ZInputChatPhotoEmptyZInputPeerChannelZchannelsZ	EditPhoto
ValueError)r   r   Zpeer r   h/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/chats/delete_chat_photo.pydelete_chat_photo   s"    z!DeleteChatPhoto.delete_chat_photoN)__name__
__module____qualname__r   intstrboolr   r   r   r   r   r      s   
r   )typingr   Zpyrogramr   r   r   r   r   r   <module>   s   