const {Command, ErrorMessage, ErrorType} = require('../../lib.js') class kick extends Command{ constructor(client){ super(client, { name: 'kick', group:'admin', memberName: 'kick', description: 'Kicks a member from the server.', needsAdmin:true, hidden:true, }) this.client = client; } async run(message, args){ const user = message.mentions.users.first(); // Check if the user mentioned exists and is not a bot if (!user || user.bot) { return new ErrorMessage(this.client).send(ErrorType.Arguments, message, ['User is a bot, or you sent something wrong.']) } // Kick the user try { await user.kick(); return message.channel.send(`${user.tag} was kicked from the server.`); } catch (error) { return console.log(`Kick: An error occurred: ${error.message}`); } } }module.exports = kick;