1let member = message.mentions.members.first();
2if(!member) return message.reply("Please mention a valid member of this server");
3if(!member.kickable) return message.reply("I cannot kick this member!");
4
5member.kick(); //.kick(reason) if you would to put in the reason through arguments
1//start by defining discord.js
2const Discord = require('discord.js');
3
4//command handlers
5exports.run = async (client, message, args) => {
6 if (!message.member.hasPermission('KICK_MEMBERS')) return message.reply('You cannot kick members')
7
8 let member = message.mentions.members.first()
9 if (!member) return message.reply('Please specify a member for me to kick them')
10 let reason = let reason = args.slice(1).join(" ");
11 if (!reason) reason = 'No Reason Given';
12 if (!member.kickable) return message.reply('This member is not kickable')
13
14 member.kick(reason).catch(err => console.log(err));
15}