【发布时间】:2022-01-14 04:58:13
【问题描述】:
我正在尝试为我的机器人创建一个/config <subcommand> 系统,但它给我一个斜杠命令体错误。
这是我当前的命令主体
name: 'config',
description: "The config system for the bot",
userPermissions: ['MANAGE_GUILD'],
options: [
{
name: 'prefix',
description: "Set a different prefifor the server",
type: "SUB_COMMAND",
options: [
{name: "new-prefix", description: "The new prefix that you want to set", type: "STRING", required: true}
]
}
]
错误是
DiscordAPIError[50035]: Invalid Form Body
0.options[0].options[0].type[NUMBER_TYPE_COERCE]: Value "STRING" is not int.
0.options[0].type[NUMBER_TYPE_COERCE]: Value "SUB_COMMAND" is not int.
我从来没有遇到过这个错误
【问题讨论】:
标签: discord discord.js