U
    ;g                     @   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eeee f edddZdS )DeleteProfilePhotoszpyrogram.Client)self	photo_idsreturnc                    sB   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   Zget_input_media_from_file_idr   ZPHOTOid).0ir   r   l/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/users/delete_profile_photos.py
<listcomp>9   s     z=DeleteProfilePhotos.delete_profile_photos.<locals>.<listcomp>)r   N)
isinstancelistboolZinvoker   Z	functionsZphotosZDeletePhotos)r   r	   Z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   Zpyrogramr   r   Zpyrogram.file_idr   r   r   r   r   r   <module>   s
   