aboutsummaryrefslogtreecommitdiff
path: root/commands/softban.js
diff options
context:
space:
mode:
authorpokesudenk <thisis@notarealema.il>2018-02-24 13:19:33 -0500
committerpokesudenk <thisis@notarealema.il>2018-02-24 13:19:33 -0500
commit10ac5297c119d63469e2d0ecd2cab12782a9f5dc (patch)
treee2472614ab91625ee01e156f27f6387768624b0d /commands/softban.js
parent394c75532cc01003846bfc6157e047ac675caf5f (diff)
parentf0eceb99aea5595c338fc130f14d0eff67c7c9f2 (diff)
downloadPokeBot-10ac5297c119d63469e2d0ecd2cab12782a9f5dc.tar.gz
PokeBot-10ac5297c119d63469e2d0ecd2cab12782a9f5dc.tar.bz2
PokeBot-10ac5297c119d63469e2d0ecd2cab12782a9f5dc.zip
Merge branch 'master' of https://github.com/PokeWorld/PokeBot
Diffstat (limited to 'commands/softban.js')
-rw-r--r--commands/softban.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/commands/softban.js b/commands/softban.js
index d17b8c1..ff5d4b5 100644
--- a/commands/softban.js
+++ b/commands/softban.js
@@ -10,6 +10,22 @@ exports.run = async (bot, msg, args) => {
.catch(err => { msg.reply('There was an error.'); console.error(err.stack);});
await msg.guild.unban(member.user.id).catch(msg.reply('There was an error.'));
msg.channel.send(`Alright, I softbanned **${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 softbanned from the server by *${msg.author.tag}*.`)
+ .addField('Reason', reason)
+ .addField('Moderator', msg.author.tag)
+ .setTimestamp()
+ .setFooter(`${msg.author.tag} softbanned ${member.user.tag}`, msg.author.avatarURL);
+ msg.guild.channels.find('name', 'logs').send({ embed });
+ }
+ catch (err) {
+ console.error(err.stack);
+ }
};
exports.conf = {