每当我尝试使用!delcoms(金额)命令时,此命令就会在控制台中弹出,并且只会删除命令消息。
我已经尽力了。
if(message.content.startsWith(prefix + "delcom")){
let args = message.content.split(" ").slice(1);
let author = message.member;
let role = message.guild.roles.find(role => role.name === "Admin");
if(author.roles.has(role.id)){
}
if(!args[0]){
message.delete();
message.author.send({embed: {
color: 0x991501,
description: "You need to write at least 1."
}});
return;
}
if(args[0] > 100){
message.delete();
message.author.send({embed: {
color: 0x991501,
description: "Maximum number of delcoms is **100** at once"
}});
return;
}
message.delete();
message.channel.bulkDelete(args[0]);
message.author.send({embled:{
color: 0x3ac45d, description: "Done, I deleted" + args[0] + " messages."
}})
return;
}
我不想摆脱这个问题,因此该命令有效。谢谢!
答案 0 :(得分:0)
您的问题是错别字。
message.author.send({embled:{ color: 0x3ac45d, description: "Done, I deleted" + args[0] + " messages." }})
它不起作用,但是如果我这样做message.author.send ("Done, I deleted" + args[0] + " messages.")
您写了embled
而不是 embed
答案 1 :(得分:-1)
似乎您遇到了种族问题,请尝试使用类似async的库,并使用async.waterfall或async.series