📜  权限 discord.js - Javascript 代码示例

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

代码示例1
if (member.hasPermission('KICK_MEMBERS')) {
    console.log('This member can kick');
}

if (member.hasPermission(['KICK_MEMBERS', 'BAN_MEMBERS'])) {
    console.log('This member can kick and ban');
}

if (member.hasPermission('KICK_MEMBERS', { checkAdmin: false, checkOwner: false })) {
    console.log('This member can kick without allowing admin to override');
}