Ë
    :É„j  ã                   ó@   — d dl mZmZmZ d dlZd dlmZ  G d„ d«      Zy)é    )ÚUnionÚBinaryIOÚListN)Úrawc                   ó\   — e Zd Zdddddœdddeeef   dedeeee   f   deeef   d	efd
„Z	y)ÚSetProfilePhotoN)ÚphotoÚemojiÚemoji_backgroundÚvideoÚselfzpyrogram.Clientr	   r
   r   r   Úreturnc             ƒ   óˆ  K  — d}|r;|�|ndg}t        |t        «      r|g}t        j                  j	                  ||¬«      }t        | j                  t        j                  j                  j                  | j                  |«      ƒ d{  –—† || j                  |«      ƒ d{  –—† ¬«      «      ƒ d{  –—† «      S 7 Œ27 Œ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 bots method only works for photo only.

        .. include:: /_includes/usable-by/users-bots.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.

            emoji (``int``, *optional*):
                Unique identifier (int) of the emoji to be used as the profile photo.

            emoji_background (``int`` | ``List[int]``, *optional*):
                hexadecimal colors or List of hexadecimal colors to be used as the chat photo background.

            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")
        Niÿÿÿ )Úemoji_idÚbackground_colors)ÚfileÚvideo_emoji_markupr   )Ú
isinstanceÚintr   ÚtypesÚVideoSizeEmojiMarkupÚboolÚinvokeÚ	functionsÚphotosÚUploadProfilePhotoÚ	save_file)r   r	   r
   r   r   r   r   s          ú_/var/www/html/GAP/venv/lib/python3.12/site-packages/pyrogram/methods/users/set_profile_photo.pyÚset_profile_photoz!SetProfilePhoto.set_profile_photo   sÃ   è ø€ ðb ˆÙØ4DÐ4PÑ 0ÐW_ÐV`ÐÜÐ+¬SÔ1Ø%6Ð$7Ð!Ü—y‘y×5Ñ5ØØ"3ð 6ó ˆHô
 Ø—+‘+Ü—‘×$Ñ$×7Ñ7Ø#Ÿ~™~¨eÓ4×4Ø'/Ø $§¡¨uÓ 5×5ð 8ó ó÷ ó
ð 	
ð 5øà5øð	ús6   ‚BCÂ	B<Â
CÂ"B>Â#CÂ3C Â4	CÂ>CÃ C)
Ú__name__Ú
__module__Ú__qualname__r   Ústrr   r   r   r   r   © ó    r   r   r      su   „ ð '+ØØ26Ø&*òC
ØðC
ð �S˜(�]Ñ#ðC
ð ð	C
ð
    T¨#¡Y Ñ/ðC
ð �S˜(�]Ñ#ðC
ð 
ôC
r%   r   )Útypingr   r   r   Úpyrogramr   r   r$   r%   r   ú<module>r(      s   ð÷( )Ñ (ã Ý ÷D
ò D
r%   