command(client, 'stats', message => {
const args = message.content.slice(prefix.length).trim().split(' ');
if (args.length == 0) {
const embedStats = new Discord.MessageEmbed()
.setTitle('Module Stats')
.setDescription(`Please specify a module\n\*Example:\*\n\`${prefix}stats enrich\``)
message.channel.send(embedStats);
}
else if (args.length > 0) {
switch(args[1]){
// stats mining boost
case "miningboost":
const { linkMiningBoost } = linksMining
const { linkImgMiningBoost } = linksMining
const embedMiningBoost = new Discord.MessageEmbed()
.setTitle('Mining Boost')
.setDescription(`[Click for stats](${linkMiningBoost})`)
message.channel.send(embedMiningBoost);
break;
// stats enrich
case "enrich":
const { linkEnrich } = linksMining
const { linkImgEnrich } = linksMining
const embedEnrich = new Discord.MessageEmbed()
.setTitle('Enrich')
.setDescription(`[Click for stats](${linkEnrich})`)
message.channel.send(embedEnrich);
break;
default:
const embedNoModule = new Discord.MessageEmbed()
.setTitle('Module Stats')
.setDescription(`Module not recognised`)
message.channel.send(embedNoModule);
}
}
})
这是我所拥有的。
我喜欢 3 个结果:
单独发送 !stats 目前给了我 embedNoModule,这是错误的。 有什么想法吗?