From c488bbf6c8b5fd0c4bc23cbb8e92db54f19e0f98 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Fri, 18 Aug 2017 11:29:58 +0000 Subject: [PATCH] Cats --- commands/moderation/hackban.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/commands/moderation/hackban.js b/commands/moderation/hackban.js index 6051191d..408511f2 100644 --- a/commands/moderation/hackban.js +++ b/commands/moderation/hackban.js @@ -50,10 +50,14 @@ module.exports = class HackbanCommand extends Command { time: 30000 }); if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.'); - await msg.guild.ban(id, { - days: 7, - reason: `${msg.author.tag}: ${reason}` - }); + try { + await msg.guild.ban(id, { + days: 7, + reason: `${msg.author.tag}: ${reason}` + }); + } catch (err) { + return msg.say(`Could not ban the user: \`${err.message}\``); + } await msg.say(`Successfully banned ${user.tag}.`); if (!modlogs) { return msg.say('Could not log the ban to the mod logs.');