delete_bot_commands()#
- Client.delete_bot_commands()#
Delete the list of the bot’s commands for the given scope and user language. After deletion, higher level commands will be shown to affected users.
The commands passed will overwrite any command set previously. This method can be used by the own bot only.
Usable by Users Bots- Parameters:
scope (
BotCommandScope
, optional) – An object describing the scope of users for which the commands are relevant. Defaults toBotCommandScopeDefault
.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
# Delete commands await app.delete_bot_commands()