Javascript 如何在discord.js-Commando上禁用默认命令?
我想禁用Commando附带的所有默认命令。我试图使用这段代码,但每次都会遇到同样的错误 我已经尝试过相同代码的其他格式,但都不起作用Javascript 如何在discord.js-Commando上禁用默认命令?,javascript,bots,discord,Javascript,Bots,Discord,我想禁用Commando附带的所有默认命令。我试图使用这段代码,但每次都会遇到同样的错误 我已经尝试过相同代码的其他格式,但都不起作用 bot.registry.registerDefaultCommands({ help: false, prefix: false, ping: false, _eval: false, unknownCommand: true, commandState: true }) throw new Error(`A command with the nam
bot.registry.registerDefaultCommands({
help: false,
prefix: false,
ping: false,
_eval: false,
unknownCommand: true,
commandState: true
})
throw new Error(`A command with the name/alias "${command.name}" is already registered.`);
^
Error: A command with the name/alias "eval" is already registered.
我偶然发现了这篇文章,发现它还没有得到答案。因此,我将分享一个答案 删除:
bot.registry.registerDefaultCommands({
help: false,
prefix: false,
ping: false,
_eval: false,
unknownCommand: true,
commandState: true
})
删除此选项将删除所有默认命令,您可以在这些命令之后自由命名命令。如果您需要更多帮助,请回复此帖子