diff options
Diffstat (limited to 'commands/softban.js')
| -rw-r--r-- | commands/softban.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/softban.js b/commands/softban.js index ff5d4b5..8c4fee0 100644 --- a/commands/softban.js +++ b/commands/softban.js @@ -6,7 +6,7 @@ exports.run = async (bot, msg, args) => { if (!member) return await msg.reply('Who am I gonna softban?'); const reason = args.join(' ').slice(3 + member.user.id.length); - await member.ban({ days: 7, reason: msg.author.tag + ': ' + (reason ? ': ' + reason : '') }) + await member.ban({ days: 7, reason: msg.author.tag + ': ' + (reason ? reason : '') }) .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}**.` : '.')}`); @@ -16,8 +16,8 @@ exports.run = async (bot, msg, args) => { .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) + .setDescription(`*${member.user.tag}* was softbanned from the server by *${msg.author.tag}*.`) + .addField('Reason', reason ? reason : '*none*') .addField('Moderator', msg.author.tag) .setTimestamp() .setFooter(`${msg.author.tag} softbanned ${member.user.tag}`, msg.author.avatarURL); |
