U
    ;g
                     @   s6   d dl mZmZ d dlZd dlmZ G dd dZdS )    )UnionBinaryION)rawc                   @   s8   e Zd Zddddeeef eeef edddZdS )SetProfilePhotoN)photovideozpyrogram.Client)selfr   r   returnc                   s:   t | tjjj| |I dH | |I dH dI dH S )a?  Set a new profile photo or video (H.264/MPEG-4 AVC video, max 5 seconds).

        The ``photo`` and ``video`` arguments are mutually exclusive.
        Pass either one as named argument (see examples below).

        .. note::

            This method only works for Users.
            Bots profile photos must be set using BotFather.

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

        Parameters:
            photo (``str`` | ``BinaryIO``, *optional*):
                Profile photo to set.
                Pass a file path as string to upload a new photo that exists on your local machine or
                pass a binary file-like object with its attribute ".name" set for in-memory uploads.

            video (``str`` | ``BinaryIO``, *optional*):
                Profile video to set.
                Pass a file path as string to upload a new video that exists on your local machine or
                pass a binary file-like object with its attribute ".name" set for in-memory uploads.

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

        Example:
            .. code-block:: python

                # Set a new profile photo
                await app.set_profile_photo(photo="new_photo.jpg")

                # Set a new profile video
                await app.set_profile_photo(video="new_video.mp4")
        N)filer   )boolZinvoker   Z	functionsZphotosZUploadProfilePhotoZ	save_file)r   r   r    r   h/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/users/set_profile_photo.pyset_profile_photo   s    *z!SetProfilePhoto.set_profile_photo)__name__
__module____qualname__r   strr   r   r   r   r   r   r   r      s   

r   )typingr   r   Zpyrogramr   r   r   r   r   r   <module>   s   