From 4aa9522da9ccdae797458abd963788064610f8ce Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 16 Aug 2017 17:45:08 +0000 Subject: [PATCH] More Bugs Squshed --- structures/Util.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/structures/Util.js b/structures/Util.js index 19e7a674..d709f2e2 100644 --- a/structures/Util.js +++ b/structures/Util.js @@ -44,7 +44,9 @@ class Util { static filterTopics(channels, setting) { return channels.filter(c => { - if (c.type !== 'text' || !c.topic || !c.permissionsFor(c.client.user).has('SEND_MESSAGES')) return false; + if (c.type !== 'text') return false; + if (!c.topic) return false; + if (!c.permissionsFor(c.client.user).has('SEND_MESSAGES')) return false; if (c.topic.includes(`<${setting}>`)) return true; return false; });