o
    -˜Žj	  ã                   @   sN   d dl mZmZ d dlZd dlmZ d dlmZ d dlmZ G dd„ dƒZdS )é    )ÚListÚUnionN)Úraw)Úutils)ÚFileTypec                   @   s.   e Zd Zdddeeee f defdd„ZdS )ÚDeleteProfilePhotosÚselfzpyrogram.ClientÚ	photo_idsÚreturnc                 Ã   sD   �t |tƒr|n|g}dd„ |D ƒ}t|  tjjj|d�¡I dH ƒS )a  Delete your own profile photos.

        .. include:: /_includes/usable-by/users.rst

        Parameters:
            photo_ids (``str`` | List of ``str``):
                A single :obj:`~pyrogram.types.Photo` id as string or multiple ids as list of strings for deleting
                more than one photos at once.

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

        Example:
            .. code-block:: python

                # Get the photos to be deleted
                photos = [p async for p in app.get_chat_photos("me")]

                # Delete one photo
                await app.delete_profile_photos(photos[0].file_id)

                # Delete the rest of the photos
                await app.delete_profile_photos([p.file_id for p in photos[1:]])
        c                 S   s   g | ]
}t  |tj¡j‘qS © )r   Úget_input_media_from_file_idr   ÚPHOTOÚid)Ú.0Úir   r   úi/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/users/delete_profile_photos.pyÚ
<listcomp>:   s    z=DeleteProfilePhotos.delete_profile_photos.<locals>.<listcomp>)r   N)Ú
isinstanceÚlistÚboolÚinvoker   Ú	functionsÚphotosÚDeletePhotos)r   r	   Úinput_photosr   r   r   Údelete_profile_photos   s   €ÿÿz)DeleteProfilePhotos.delete_profile_photosN)Ú__name__Ú
__module__Ú__qualname__r   Ústrr   r   r   r   r   r   r   r      s    ÿþýr   )	Útypingr   r   Úpyrogramr   r   Úpyrogram.file_idr   r   r   r   r   r   Ú<module>   s   