o
    -˜ŽjJ  ã                   @   sn   d dl Z d dlZ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 d dl	m
Z
mZ G dd„ dƒZdS )	é    N)ÚUnionÚOptional)Úraw)Útypes)Úutils)ÚFileIdÚFileTypec                   @   sJ   e Zd Z			ddddedededeeef d	ed
eded fdd„ZdS )ÚCreateStickerSetNõ   ðŸ¤”Úselfzpyrogram.ClientÚtitleÚ
short_nameÚstickerÚuser_idÚemojiÚmasksÚreturnztypes.Messagec              
   Ã   s6  �| j jr|du rtdƒ‚t|tƒrRtj |¡st 	d|¡r@| j
|p#d|ddd�I dH }t |jjtj¡}|j}	| ¡ I dH }
n3t |¡}tjj|j|j|jd�}	n!| j
|pWd|ddd�I dH }t |jjtj¡}|j}	| ¡ I dH }
|  tjjj|  |p~d¡I dH ||tjj |	|d�g|d	�¡I dH }tj! "|j#¡S )
uÞ  Create a new stickerset.

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

        Parameters:
            title (``str``):
                Stickerset name, 1-64 chars

            short_name (``str``, *optional*):
                Short name of sticker set, to be used in sticker deep links.
                Can contain only english letters, digits and underscores.
                Must begin with a letter, can't contain consecutive underscores and, if called by a bot, must end in "_by_<bot_username>".
                <bot_username> is case insensitive. 1-64 characters.

            sticker (``str``):
                sticker to add.
                Pass a file_id as string to send a file that exists on the Telegram servers.

            user_id (``int`` | ``str``, *optional*):
                Unique identifier (int) or username (str) of the Stickerset owner.
                For you yourself you can simply use "me" or "self" (users only).
                required for bots.
                default to "me".

            emoji (``str``, *optional*):
                Associated emoji.
                default to "ðŸ¤”"

            masks (``bool``, *optional*):
                Whether this is a mask stickerset.

        Returns:
            :obj:`~pyrogram.types.StickerSet` | ``None``: On success, the StickerSet is returned.

        Example:
            .. code-block:: python

                await app.create_sticker_set("me", "My First Pack", "myfirstpack", "AAjjHjk")
        Nzuser_id is required for botsz
^https?://ÚmeT)Úforce_documentÚdisable_notification)ÚidÚaccess_hashÚfile_reference)Údocumentr   )r   r   r   Ústickersr   )$r   Úis_botÚ
ValueErrorÚ
isinstanceÚstrÚosÚpathÚisfileÚreÚmatchÚsend_documentr   Úget_input_media_from_file_idr   Úfile_idr   ÚDOCUMENTr   Údeleter   Údecoder   r   ÚInputDocumentÚmedia_idr   r   ÚinvokeÚ	functionsr   r	   Úresolve_peerÚInputStickerSetItemÚ
StickerSetÚ_parseÚset)r   r   r   r   r   r   r   r   Úuploaded_mediaÚmediaÚ_ÚdecodedÚr© r8   úi/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/stickers/create_sticker_set.pyÚcreate_sticker_set   sV   €1
ü
ýüþÿö
ÿz#CreateStickerSet.create_sticker_set)Nr
   N)	Ú__name__Ú
__module__Ú__qualname__r   r   ÚintÚboolr   r:   r8   r8   r8   r9   r	      s*    ùÿþýü
ûúùør	   )r   r"   Útypingr   r   Úpyrogramr   r   r   Úpyrogram.file_idr   r   r	   r8   r8   r8   r9   Ú<module>   s   