Ë
    žDjž
  ã                   ó<   — d dl mZmZ d dlZd dlmZ  G d„ d«      Zy)é    )ÚUnionÚBinaryION)Úrawc            	       ó@   — e Zd Zdddœdddeeef   deeef   defd„Zy)	ÚSetProfilePhotoN)ÚphotoÚvideoÚselfzpyrogram.Clientr   r	   Úreturnc          
   ƒ   ó  K  — t        | j                  t        j                  j                  j                  | j                  |«      ƒ d{  –—† | j                  |«      ƒ d{  –—† ¬«      «      ƒ d{  –—† «      S 7 Œ17 Œ7 Œ­w)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	   )ÚboolÚinvoker   Ú	functionsÚphotosÚUploadProfilePhotoÚ	save_file)r
   r   r	   s      úX/root/auto/venv/lib/python3.12/site-packages/pyrogram/methods/users/set_profile_photo.pyÚset_profile_photoz!SetProfilePhoto.set_profile_photo   sq   è ø€ ôT Ø—+‘+Ü—‘×$Ñ$×7Ñ7Ø#Ÿ~™~¨eÓ4×4Ø $§¡¨uÓ 5×5ð 8ó ó÷ ó
ð 	
ð 5øØ5øðús6   ‚ABÁ
A<ÁBÁ"A>Á#BÁ3B Á4	BÁ>BÂ B)Ú__name__Ú
__module__Ú__qualname__r   Ústrr   r   r   © ó    r   r   r      sG   „ ð '+Ø&*ò	1
Øð1
ð �S˜(�]Ñ#ð1
ð �S˜(�]Ñ#ð	1
ð
 
ô1
r   r   )Útypingr   r   Úpyrogramr   r   r   r   r   ú<module>r      s   ð÷& #ã Ý ÷2
ò 2
r   