Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js')
- module.exports.run = async (bot, message, args) => {
- if(!message.member.hasPermission('ADMINISTRATOR')) return message.reply("Você não tem **permissão** suficiente !")
- let member = message.mentions.members.first()
- if(!member)
- return message.reply("Por favor mencione um usuário válido !")
- if(!member.bannable)
- return message.reply("Eu não posso banir esse usuário, ele pode ter um cargo maior que o meu.")
- let reason = args.slice(1).join(' ')
- if(!reason) reason = "Nenhuma razão fornecida"
- await member.ban(reason)
- .catch(error => message.reply(`Desculpe ${message.author} não consegui banir o membro devido o: ${error}`))
- message.channel.send(`${message.author}, usuário punido com sucesso!`)
- let servericon = message.author.displayAvatarURL;
- let pEmbed = new Discord.RichEmbed()
- .setTitle("__:octagonal_sign: Banimento | TeamFenix__")
- .addField("__:paperclip: Punido__", `${member.user.tag}`)
- .addField("__:bust_in_silhouette: Punidor__", `${message.author.tag}`)
- .addField("__:pushpin: Motivo__", `${reason}`)
- .setFooter(`TeamFenix - Discord Oficial - Copyright© `, bot.user.displayAvatarURL)
- .setThumbnail(servericon)
- .setColor("#000000").setTimestamp()
- let canal = bot.channels.get("634872878927708189").send(pEmbed)
- .then(async (msg) => {
- });
- }
- module.exports.help = {
- name: "ban"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement