“Discord.js Ban Comando” Respostas de código

Discord.js Ban Comando

if (msg.member.hasPermission("BAN_MEMBERS")) {
    if (msg.members.mentions.first()) {
        try {
            msg.members.mentions.first().ban();
        } catch {
            msg.reply("I do not have permissions to ban" + msg.members.mentions.first());
        }
    } else {
        msg.reply("You do not have permissions to ban" + msg.members.mentions.first());
    }
}
Fair Ferret

Discord.js Ban Comando

if (msg.member.hasPermission("KICK_MEMBERS")) {
    if (msg.members.mentions.first()) {
        try {
            msg.members.mentions.first().kick();
        } catch {
            msg.reply("I do not have permissions to kick " + msg.members.mentions.first());
        }
    } else {
        msg.reply("You do not have permissions to kick " + msg.members.mentions.first());
    }
}
Fair Ferret

Discord.js Ban Ban User

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

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

Discord.js Ban Comando

//This is the command but you need the kcik command

if (message.content.startsWith("d!kick")) {if (message.member.hasPermission("KICK_MEMBERS")) {
let member = message.mentions.members.first()
if (!member) message.channel.send("Please mention someone")
  else {member.kick().then(mem => {message.channel.send(`Kicked ${mem.user.username}!`)
})}} else {message.reply("You don't have the permission to do that...")}}  if (message.content.startsWith('d!ban')) {if(message.member.hasPermission("BAN_MEMBERS")) {const user = message.mentions.users.first(); if (user) {const member = message.guild.member(user);if (member) {
member

            		

Javascript answers related to “Discord.js ban command”


Javascript queries related to “Discord.js ban command”




Browse Javascript Answers by Framework


More “Kinda” Related Javascript Answers View All Javascript Answers »

Sore Serval

Respostas semelhantes a “Discord.js Ban Comando”

Perguntas semelhantes a “Discord.js Ban Comando”

Mais respostas relacionadas para “Discord.js Ban Comando” em JavaScript

Procure respostas de código populares por idioma

Procurar outros idiomas de código