#setMyCommands
使用此方法设置机器人的命令列表(用户输入 / 时展示的菜单)。成功返回 True。
参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
| commands | Array of BotCommand | Yes | JSON 序列化的命令数组,如 [{"command":"start","description":"开始"}] |
| scope | BotCommandScope | Optional | 命令作用域:default、all_private_chats、all_group_chats、all_chat_administrators、chat、chat_administrators、chat_member |
| language_code | String | Optional | ISO 639-1 语言代码,用于本地化命令 |
示例
curl -X POST "https://mivra.im/bot<TOKEN>/setMyCommands" -H "Content-Type: application/json" -d '{"commands":[{"command":"start","description":"开始使用"},{"command":"help","description":"帮助"}]}'
备注
最多 100 条命令;description 最长 256 字符。
