showing results for - "discord js kick user"
Miley
11 Apr 2018
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
Simona
12 Jun 2020
1let member = message.mentions.members.first();
2if(!member) message.reply("Please mention a valid member of this server") return;
3if(!member.kickable) message.reply("This member is not kickable") return;
4// Now check if the user has the Kick Members Permission
5if(!member.hasPermission('KICK_MEMBERS') {
6   message.reply("You Can't kick anyone");
7	return;
8} else {
9 // Now If they do kick the user
10  member.kick();
11}
12// If this works please upvote!
Esteban
20 Jan 2021
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}
queries leading to this page
discord js cant kick usersdiscord js kick memberskick command discord jkick command discord js guidekick discord js by id how to kick member from voice channel discord jskick someone discord jskick user discord jskick member discordjshow to kick members using id discord jsdiscord js kick logkick user from guilsd discord jssimple kick command discord js v12ban and kick command discord jshow to kick user from vc discord jshow to kick somone discord jsdiscord js kick membersdiscord js cannot kick userskick command with reason discord jskick discord jsdiscord js how to kick certain userdiscord js kickablehow to kick a user with a reason discord jsdiscord js on kickdiscord js kick command with reasonhow to kick any user discord jsdiscord js kick commanddsicord bot kick js user by idhow to kick a member using id discord jskick member discord jsdiscord kick command using id discord jshow to kick discord jshow to maek a kick command in discord jsbot can 27t kick user discord jsdiscord js kick by iddiscordjs kick commandhow to make a kick command discord jshow to kick a member discord jsauto kick command discord jsdiscord js kickmember kick 28reason 29 discord jsdiscord js kick yourselfdiscordjs kick memberdiscord js ban and kick commandhow to kick someone in discord jsdiscord js user kickkick members discord jshow to kick users discord jskick user discord jskick all command discord jsbot cant kick user discord jskick code discord jskick command for users with kick members discord js kick 28 29 discord jsdiscordjs kick user with idkick command for users with kick members discord jsdiscord js kick specific userdiscord js kick command with timekick command for discord jshow to kick members in discord with bot discord jsdiscord js kick member from voicediscordjs canjot kick memberdiscord js kick user from iddiscord js kick command with permissionsdiscord js kick botdiscord js kick commanddiscord js kick command with reason command handlerdsicord js kickdiscord js kickdiscord js kick memberkick command discord jsuser kick discord js not workingdiscord js kick userekick in discord jskick someone in discord jsdiscord js how to kick a userdiscord js kick reasonkick all users discord jskick discord jshow to avoid kick the owner command discord jskick someone from discord jsdiscord js kick user by iddiscord bot js kick userdiscord js kick command v12discord js kick command for a certain timekick user from discord server discord jskick command discord js 12discord js kick userkick member with discord jsmember kick discord jsbot kick user from server discord jsdiscord js kick userdiscord js kick membershow to kick members discord jsdiscord js kick cmdkick member discord jskick commands discord jskick command with id discord jsdiscord net kick userdiscord js kick user