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
1ban someone discord jsJavascript By Lime on Jun 21 2020
2if (!message.member.hasPermission("BAN_MEMBERS")) return message.channel.send("Invalid Permissions")
3let User = message.guild.member(message.mentions.users.first()) || message.guild.members.get(args[0])
4if (!User) return message.channel.send("Invalid User")
5if (User.hasPermission("BAN_MEMBERS")) return message.reply("Invalid Permissions")
6let banReason = args.join(" ").slice(22);
7if (!banReason) {
8 banReason = "None"
9}
10
11User.ban({reason: banReason})
1if (msg.member.hasPermission("KICK_MEMBERS")) {
2 if (msg.members.mentions.first()) {
3 try {
4 msg.members.mentions.first().kick();
5 } catch {
6 msg.reply("I do not have permissions to kick " + msg.members.mentions.first());
7 }
8 } else {
9 msg.reply("You do not have permissions to kick " + msg.members.mentions.first());
10 }
11}
12