More Bugs Squshed

This commit is contained in:
Daniel Odendahl Jr
2017-08-16 17:45:08 +00:00
parent a4c8638552
commit 4aa9522da9
+3 -1
View File
@@ -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;
});