bots.setBotCommands #

Set bot command list

Layer 223

boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
bots.setBotCommands#517165a scope:BotCommandScope lang_code:string commands:Vector<BotCommand> = Bool;

Parameters #

NameTypeDescription
scopeBotCommandScopeCommand scope
lang_codestringLanguage code
commandsVector<BotCommand>Bot commands

Result #

Bool

Only bots can use this method #

Possible errors #

CodeTypeDescription
400BOT_COMMAND_DESCRIPTION_INVALIDThe specified command description is invalid.
400BOT_COMMAND_INVALIDThe specified command is invalid.
400LANG_CODE_INVALIDThe specified language code is invalid.
400PEER_ID_INVALIDThe provided peer id is invalid.
400USER_BOT_REQUIREDThis method can only be called by a bot.
400USER_ID_INVALIDThe provided user ID is invalid.