U
    ;g
                     @   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                   @   s0   e Zd Ze dfded deedddZdS )	SetBotCommands zpyrogram.Clientztypes.BotCommandztypes.BotCommandScope)selfcommandsscopelanguage_codereturnc                    s6   |  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   f/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/bots/set_bot_commands.py
<listcomp>E   s     z3SetBotCommands.set_bot_commands.<locals>.<listcomp>N)r   r	   Z	lang_code)Zinvoker   Z	functionsZbotsr   r   )r   r   r	   r
   r   r   r   set_bot_commands   s    (zSetBotCommands.set_bot_commandsN)	__name__
__module____qualname__r   ZBotCommandScopeDefaultr   strboolr   r   r   r   r   r      s   r   )typingr   Zpyrogramr   r   r   r   r   r   r   <module>   s   