From 75425d6cdaa4debe8d2c02901a254d60612df331 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Fri, 24 Mar 2017 02:35:33 +0000 Subject: [PATCH] Fix for Mod Commands? --- commands/moderation/ban.js | 1 + commands/moderation/kick.js | 1 + commands/moderation/warn.js | 1 + 3 files changed, 3 insertions(+) diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index 85031663..19994d4f 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -15,6 +15,7 @@ module.exports = class BanCommand extends commando.Command { }); } hasPermission(msg) { + if (msg.channel.type === 'dm') return; return msg.member.hasPermission('BAN_MEMBERS'); } diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index b79cf3ac..d5c3af95 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -12,6 +12,7 @@ module.exports = class KickCommand extends commando.Command { }); } hasPermission(msg) { + if (msg.channel.type === 'dm') return; return msg.member.hasPermission('KICK_MEMBERS'); } diff --git a/commands/moderation/warn.js b/commands/moderation/warn.js index 037ec169..008980b7 100644 --- a/commands/moderation/warn.js +++ b/commands/moderation/warn.js @@ -12,6 +12,7 @@ module.exports = class WarnCommand extends commando.Command { }); } hasPermission(msg) { + if (msg.channel.type === 'dm') return; return msg.member.hasPermission('MANAGE_MESSAGES'); }