我得到了错误:TypeError: MOD.hasPermissions is not a function!
你能帮我么?
const commando = require('discord.js-commando');
class KickCommand extends commando.Command {
constructor(client) {
super(client, {
name: 'kick',
group: 'mod',
memberName: 'kick',
description: 'Kicks a member'
});
}
async run(message, args, args2) {
const MOD = message.author;
const user = message.mentions.members.first()
const reason = args2;
if (MOD.hasPermissions('KICK_MEMBERS', true)) {
user.kick(reason);
} else {
message.reply('You don\'t have permission to kick members!');
}
}
}
module.exports = KickCommand;