From e041712a2d0bee3f66887214a4da159488f96ea4 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Fri, 12 Oct 2018 10:56:30 +0200 Subject: [PATCH] add message when nothing have been specified --- commands/admin/ban.js | 2 ++ commands/admin/kick.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/commands/admin/ban.js b/commands/admin/ban.js index a84d610f..5867e7aa 100644 --- a/commands/admin/ban.js +++ b/commands/admin/ban.js @@ -26,6 +26,8 @@ module.exports = class BanCommand extends Command { } async run(message, { member, reasons }) { + if(!reasons) + reasons = 'Nothing have been specified' if(member.id === message.author.id) return message.say("Why would you ban yourself ?") member.ban(reasons) diff --git a/commands/admin/kick.js b/commands/admin/kick.js index d61bee51..e37df677 100644 --- a/commands/admin/kick.js +++ b/commands/admin/kick.js @@ -26,6 +26,8 @@ module.exports = class KickCommand extends Command { } async run(message, { member, reasons }) { + if(!reasons) + reasons = 'Nothing have been specified' if(member.id === message.author.id) return message.say("Why would you kick yourself ?") member.kick(reasons)