我遇到了关于嵌入命令的问题,我试图让用户在这个嵌入命令中选择颜色代码,但这是我遇到的错误:RangeError: Argument type "colorcode" isn't registered.
.
我的代码:
const { Command } = require('discord.js-commando');
const { RichEmbed } = require('discord.js');
module.exports = class EmbedCommand extends Command {
constructor(client) {
super(client, {
name: 'embed',
group: 'extra commands',
memberName: 'embed',
description: 'Replies with the text you provide, But in Embed.',
args: [
{
key:"text",
prompt:"What Should the Embed Say?",
type:"string",
},
{
key:"color",
prompt:"What Color should the Embed be? (Use Color Codes.). Use RANDOM for Random Color. (Must Be All Caps!).",
type:'colorcode',
}
]
});
}
run(msg, { text }) {
msg.delete();
let embed = new RichEmbed()
.setTitle(text)
.setColor(color)
msg.embed(embed)
}
};
.
有谁知道如何更换colorcode
?