From 4dfad98aa636e9f748cc88866ba69cb35789375c Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 23 Feb 2018 21:53:00 -0500 Subject: [PATCH] Kicking --- commands/kick.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 commands/kick.js diff --git a/commands/kick.js b/commands/kick.js new file mode 100644 index 0000000..b58c4c3 --- /dev/null +++ b/commands/kick.js @@ -0,0 +1,20 @@ +exports.run = (bot, msg, args) => { + if (!msg.member.hasPermission('KICK_MEMBERS')) return msg.reply('You don\'t have permssion to kick members'); + if (!msg.guild.member(bot.user).hasPermission('KICK_MEMBERS')) return msg.reply('I don\'t have permssion to kick members'); + const member = msg.mentions.members.first(); + member.kick(args.join(' ').slice(3 + member.user.id.length)).then(() => { + msg.channel.send(`Alright, I kicked **${member.user.tag}** for the reason **${args.join(' ').slice(3 + member.user.id.length)}**`); + }); +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'kick', + description: 'Kick a user out of the server', + usage: '@ <...reason>', + category: 'Moderation', +};