“Discord.js Cara Menendang Pengguna” Kode Jawaban

Discord.js menendang pengguna

let member = message.mentions.members.first();
if(!member) return message.reply("Please mention a valid member of this server");
if(!member.kickable) return message.reply("I cannot kick this member!");

member.kick(); //.kick(reason) if you would to put in the reason through arguments
HeyItsDeveloperRhys

Discord.js Cara Menendang Pengguna

let member = message.mentions.members.first();
if(!member) message.reply("Please mention a valid member of this server") return;
if(!member.kickable) message.reply("This member is not kickable") return;
// Now check if the user has the Kick Members Permission
if(!member.hasPermission('KICK_MEMBERS') {
   message.reply("You Can't kick anyone");
	return;
} else {
 // Now If they do kick the user
  member.kick();
}
// If this works please upvote!
Defiant Dormouse

Jawaban yang mirip dengan “Discord.js Cara Menendang Pengguna”

Pertanyaan yang mirip dengan “Discord.js Cara Menendang Pengguna”

Lebih banyak jawaban terkait untuk “Discord.js Cara Menendang Pengguna” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya