📜  踢命令 discord.js - Javascript 代码示例

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

代码示例3
if (msg.member.hasPermission("KICK_MEMBERS")) {
    if (msg.members.mentions.first()) {
        try {
            msg.members.mentions.first().kick();
        } catch {
            msg.reply("I do not have permissions to kick " + msg.members.mentions.first());
        }
    } else {
        msg.reply("You do not have permissions to kick " + msg.members.mentions.first());
    }
}