kick
A powerful discord bot making library to help you make discord bots. Super easy, 100 percent discord api coverage, and more! Discord.lib also allows you to interact with discord.js.
This is the function that will kick a member out of the server.
Parameters
Parameter
Description
Require
command
command name
yes
Example
example for using discord.lib kick
const dl = require("discord.lib")
dl.kick("A_kick")//usage will be A_kick @member#1234
example for interacting with discord.lib.client
const dl = require("discord.lib")
dl.client.on("message", msg => {
if(msg.startsWith("kick")){
if(!msg.member.hasPermission("your permission"))return;
let mention = msg.mentions.users.first();
let member = msg.guild.member(mention)
member.kick("optional reason for audit log")
}
})
Last updated
Was this helpful?