📌  相关文章
📜  discord.js 踢用户 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:46.059000             🧑  作者: Mango

代码示例2
let member = message.mentions.members.first();
if(!member) message.reply("Please mention a valid member of this server") return;
if(!member.kickable) message.reply("This member is not kickable") return;
// Now check if the user has the Kick Members Permission
if(!member.hasPermission('KICK_MEMBERS') {
   message.reply("You Can't kick anyone");
    return;
} else {
 // Now If they do kick the user
  member.kick();
}
// If this works please upvote!