diff options
| author | Unknown <jtsshieh@outlook.com> | 2018-02-24 13:17:05 -0500 |
|---|---|---|
| committer | Unknown <jtsshieh@outlook.com> | 2018-02-24 13:17:05 -0500 |
| commit | 057982b739f734ed0615a9545992b9cde9ad2dbe (patch) | |
| tree | c89e1923914e39e9fe08c53e0cbbe9f6aa6d657d /commands/softban.js | |
| parent | b23970f7fba781030601b6ef436e615df3ecc40b (diff) | |
| download | PokeBot-057982b739f734ed0615a9545992b9cde9ad2dbe.tar.gz PokeBot-057982b739f734ed0615a9545992b9cde9ad2dbe.tar.bz2 PokeBot-057982b739f734ed0615a9545992b9cde9ad2dbe.zip | |
try this
Diffstat (limited to 'commands/softban.js')
| -rw-r--r-- | commands/softban.js | 16 |
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 = { |
