aboutsummaryrefslogtreecommitdiff
path: root/commands/ban.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/ban.js')
-rw-r--r--commands/ban.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/commands/ban.js b/commands/ban.js
index 8d794d2..33c9277 100644
--- a/commands/ban.js
+++ b/commands/ban.js
@@ -9,6 +9,23 @@ exports.run = async (bot, msg, args) => {
await member.ban({ days: 7, reason: msg.author.tag + (reason ? ': ' + reason : '') })
.catch(err => { msg.reply('There was an error.'); console.error(err.stack);});
msg.channel.send(`Alright, I banned **${member.user.tag}**${(reason ? ` for the reason **${reason}**.` : '.')}`);
+
+ const { RichEmbed } = require('discord.js');
+ try {
+ const embed = new RichEmbed()
+ .setColor(0x00ae86)
+ .setAuthor(member.user.tag, member.user.avatarURL)
+ .setTitle(`:hammer: **${member.user.tag}**`)
+ .setDescription(`*${member.user.tag}}* was banned from the server by *${msg.author.tag}*.`)
+ .addField('Reason', reason)
+ .addField('Moderator', msg.author.tag)
+ .setTimestamp()
+ .setFooter(`${msg.author.tag} banned ${member.user.tag}`, msg.author.avatarURL);
+ msg.guild.channels.find('name', 'logs').send({ embed });
+ }
+ catch (err) {
+ console.error(err.stack);
+ }
};
exports.conf = {