
    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fdZy)DeleteChatPhotoselfzpyrogram.Clientchat_idreturnc                   K   | j                  |       d{   }t        |t        j                  j                        ri| j                  t        j                  j                  j                  |j                  t        j                  j                                      d{    yt        |t        j                  j                        r_| j                  t        j                  j                  j                  |t        j                  j                                      d{    yt        d| d      7 $7 7 w)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)channelr   zThe chat_id "z" belongs to a userT)resolve_peer
isinstancer   typesInputPeerChatinvoke	functionsmessagesEditChatPhotor   InputChatPhotoEmptyInputPeerChannelchannels	EditPhoto
ValueError)r   r   peers      [/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/chats/delete_chat_photo.pydelete_chat_photoz!DeleteChatPhoto.delete_chat_photo   s    2 &&w//dCII334++&&44 LL))779 5      cii889++&&00 ))779 1     }WI5HIJJ# 0s5   ED;BE#D>$BE&E 'E>E EN)__name__
__module____qualname__r   intstrboolr        r   r   r      s)    ,,sCx, 
,r$   r   )typingr   pyrogramr   r   r#   r$   r   <module>r'      s   &   - -r$   