Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success. This method support both normal and static use
| Name | Type | Description | Required |
|---|---|---|---|
| commands | botCommand[] | array | stdClass[] | A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. | yes |
| scope | botCommandScope | null | stdClass | A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault. | no |
| language_code | string | null | 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 | no |
| token | string | null | You can use this method on another bot with specify this parameter | no |
| forgot | bool | null | You can set to not receive request result, dont set it or pass null for turn it off | no |
| answer | bool | null | You can set to answer to webhook, dont set it or pass null for turn it off | no |
Output : bool | BPT\types\responseError
Static or normal : Static
telegram::setMyCommands(commands: Array, scope: BotCommandScope | null, language_code: string | null, token: String | null, forgot: Boolean | null, answer: Boolean | null); telegram::setMyCommands(['commands' => Array, 'scope' => BotCommandScope | null, 'language_code' => string | null, 'token' => String | null, 'forgot' => Boolean | null, 'answer' => Boolean | null]); telegram::setMyCommands(commands: Array); telegram::setMyCommands(['commands' => Array]); $this->setMyCommands(commands: Array, scope: BotCommandScope | null, language_code: string | null, token: String | null, forgot: Boolean | null, answer: Boolean | null); $this->setMyCommands(['commands' => Array, 'scope' => BotCommandScope | null, 'language_code' => string | null, 'token' => String | null, 'forgot' => Boolean | null, 'answer' => Boolean | null]); $this->setMyCommands(commands: Array); $this->setMyCommands(['commands' => Array]);