Haha-Yes/commands/admin/kick.js

28 lines
865 B
JavaScript
Raw Normal View History

2018-09-07 19:07:10 +02:00
const { Command } = require('discord.js-commando');
module.exports = class KickCommand extends Command {
constructor(client) {
super(client, {
name: 'kick',
group: 'admin',
memberName: 'kick',
description: 'Kick the mentionned user',
guildOnly: true,
2018-09-07 23:57:57 +02:00
clientPermissions: ['KICK_MEMBERS'],
2018-09-07 19:07:10 +02:00
userPermissions: ['KICK_MEMBERS'],
args: [
{
key: 'member',
prompt: 'Wich member would you like to kick?',
type: 'member',
}
]
});
}
2018-09-09 21:32:08 +02:00
async run(message) {
2018-09-07 19:07:10 +02:00
const member = message.mentions.members.first();
2018-09-16 03:23:13 +02:00
member.kick().then(member => {
2018-09-07 22:47:49 +02:00
message.reply(`${member.user.username} was succesfully kicked.`);
2018-09-07 19:07:10 +02:00
});
}
};