我已经尝试了我找到的所有代码,但由于某种原因,这不起作用,我不知道为什么。我的代码:
if(message.content.startsWith("!inrole")){
let roleName = message.content.split(" ").slice(1).join(" ");
let membersWithRole = message.guild.members.cache.filter(member => {
return member.roles.cache.find("name", roleName);
}).map(member => {
return member.user.username;
})
let embed = new discord.RichEmbed({
"title": `Membros com o${roleName}`,
"description": membersWithRole.join("\n"),
"color": 0xFFFF
});
return message.channel.send({embed});
}
暂无答案!
目前还没有任何答案,快来回答吧!