
    N[i
                     D    d dl mZ d dlZd dlmZ d dlmZ  G d d      Zy)    )ListN)raw)typesc                   R    e Zd Z ej                         dfddded   ddded	ef
d
Zy)SetBotCommands selfzpyrogram.Clientcommandsztypes.BotCommandscopeztypes.BotCommandScopelanguage_codereturnc           	        K   | j                  t        j                  j                  j	                  |D cg c]  }|j                          c}|j                  |        d{   |             d{   S c c}w 7 7 w)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")])
        N)r
   r   	lang_code)invoker   	functionsbotsr   write)r	   r
   r   r   cs        Y/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/bots/set_bot_commands.pyset_bot_commandszSetBotCommands.set_bot_commands   sn     P [[MM---56!'')6!KK--' . 
 
 	
6-
s.   3BA9B"A>#B4B 5
B BN)	__name__
__module____qualname__r   BotCommandScopeDefaultr   strboolr        r   r   r      sO     *F)E)E)G	.
.
)*.
 '.
 	.

 
.
r   r   )typingr   pyrogramr   r   r   r   r   r   <module>r!      s   &    /
 /
r   