下面的代码是我的Kick.js,但我想让mod角色只能使用kick命令 module.exports = {
name: 'kick', //command name run : async(message.guild.me.hasPermission('KICK_MEMBER')) return message.channel.send('I do not have permissionto use this
当我尝试使用踢命令时,它是TypeError: message.author.hasPermission is not a function。如果您没有KICK_MEMBERS权限,我希望它不起作用。这是我返回错误的代码:
if (!message.author.hasPermission("KICK_MEMBERS")) return;