o
    -˜Žjá
  ã                   @   s>   d dl mZ d dlZd dlmZ d dlmZ G dd„ dƒZdS )é    )ÚListN)Úraw)Útypesc                   @   s8   e Zd Ze ¡ dfddded ddded	ef
d
d„ZdS )ÚSetBotCommandsÚ Úselfzpyrogram.ClientÚcommandsztypes.BotCommandÚscopeztypes.BotCommandScopeÚlanguage_codeÚreturnc                 Ã   s8   �|   tjjjdd„ |D ƒ| | ¡I dH |d�¡I dH S )aÿ  Set the list of the bot's commands.
        The commands passed will overwrite any command set previously.
        This method can be used by the own bot only.

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

        Parameters:
            commands (List of :obj:`~pyrogram.types.BotCommand`):
                A list of bot commands.
                At most 100 commands can be specified.

            scope (:obj:`~pyrogram.types.BotCommandScope`, *optional*):
                An object describing the scope of users for which the commands are relevant.
                Defaults to :obj:`~pyrogram.types.BotCommandScopeDefault`.

            language_code (``str``, *optional*):
                A two-letter ISO 639-1 language code.
                If empty, commands will be applied to all users from the given scope, for whose language there are no
                dedicated commands.

        Returns:
            ``bool``: On success, True is returned.

        Example:
            .. code-block:: python

                from pyrogram.types import BotCommand

                # Set new commands
                await app.set_bot_commands([
                    BotCommand("start", "Start the bot"),
                    BotCommand("settings", "Bot settings")])
        c                 S   s   g | ]}|  ¡ ‘qS © )Úwrite)Ú.0Úcr   r   úc/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/bots/set_bot_commands.pyÚ
<listcomp>F   s    z3SetBotCommands.set_bot_commands.<locals>.<listcomp>N)r   r	   Ú	lang_code)Úinvoker   Ú	functionsÚbotsr   r   )r   r   r	   r
   r   r   r   Úset_bot_commands   s   €(ý
ÿzSetBotCommands.set_bot_commandsN)	Ú__name__Ú
__module__Ú__qualname__r   ÚBotCommandScopeDefaultr   ÚstrÚboolr   r   r   r   r   r      s    üÿþýüûr   )Útypingr   Úpyrogramr   r   r   r   r   r   r   Ú<module>   s
   