U
    ;g
                     @   s6   d dl mZ d dlZd dlmZmZ G dd dZdS )    )ListN)rawtypesc                   @   s.   e Zd Ze dfddeed dddZdS )	GetBotCommands zpyrogram.Clientztypes.BotCommandScopeztypes.BotCommand)selfscopelanguage_codereturnc                    s>   |  tjjj|| I dH |dI dH }tdd |D S )a  Get the current list of the bot's commands for the given scope and user language.
        Returns Array of BotCommand on success. If commands aren't set, an empty list is returned.

        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:
            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:
            List of :obj:`~pyrogram.types.BotCommand`: On success, the list of bot commands is returned.

        Example:
            .. code-block:: python

                # Get commands
                commands = await app.get_bot_commands()
                print(commands)
        N)r   Z	lang_codec                 s   s   | ]}t j|V  qd S )N)r   Z
BotCommandread).0c r   f/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/bots/get_bot_commands.py	<genexpr>C   s     z2GetBotCommands.get_bot_commands.<locals>.<genexpr>)Zinvoker   Z	functionsZbotsr   writer   r   )r   r   r	   rr   r   r   get_bot_commands   s    "
zGetBotCommands.get_bot_commandsN)__name__
__module____qualname__r   ZBotCommandScopeDefaultstrr   r   r   r   r   r   r      s   r   )typingr   Zpyrogramr   r   r   r   r   r   r   <module>   s   