From d616ecd957f28c210d08b74992ed500ee0aa84d8 Mon Sep 17 00:00:00 2001 From: Miikka Virtanen Date: Fri, 30 Dec 2016 18:01:16 +0200 Subject: [PATCH] Fix error when checking msg channel instances (Eris doesn't expose GuildChannel from Eris.GuildChannel?) --- index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/index.js b/index.js index ab9d191..675aae7 100644 --- a/index.js +++ b/index.js @@ -359,7 +359,6 @@ bot.on('messageCreate', msg => { // These messages get relayed back to the DM thread between the bot and the user // Attachments are shown as URLs bot.registerCommand('reply', (msg, args) => { - if (! (msg.channel instanceof Eris.GuildChannel)) return; if (msg.channel.guild.id !== modMailGuild.id) return; if (! msg.member.permission.has('manageRoles')) return; @@ -412,7 +411,6 @@ bot.registerCommand('reply', (msg, args) => { bot.registerCommandAlias('r', 'reply'); bot.registerCommand('close', (msg, args) => { - if (! (msg.channel instanceof Eris.GuildChannel)) return; if (msg.channel.guild.id !== modMailGuild.id) return; if (! msg.member.permission.has('manageRoles')) return; @@ -443,7 +441,6 @@ Logs: <${logurl}>`; }); bot.registerCommand('block', (msg, args) => { - if (! (msg.channel instanceof Eris.GuildChannel)) return; if (msg.channel.guild.id !== modMailGuild.id) return; if (! msg.member.permission.has('manageRoles')) return; @@ -468,7 +465,6 @@ bot.registerCommand('block', (msg, args) => { }); bot.registerCommand('unblock', (msg, args) => { - if (! (msg.channel instanceof Eris.GuildChannel)) return; if (msg.channel.guild.id !== modMailGuild.id) return; if (! msg.member.permission.has('manageRoles')) return; @@ -493,7 +489,6 @@ bot.registerCommand('unblock', (msg, args) => { }); bot.registerCommand('logs', (msg, args) => { - if (! (msg.channel instanceof Eris.GuildChannel)) return; if (msg.channel.guild.id !== modMailGuild.id) return; if (! msg.member.permission.has('manageRoles')) return;