From 666121a8c76e98cf8f54edaebd5a5ab3742222bf Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Wed, 12 Jun 2019 10:36:40 +0200 Subject: [PATCH] Update ShowHiddenChannels.plugin.js --- Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js index 054645629b..0a147e2c0d 100644 --- a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js +++ b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js @@ -344,7 +344,7 @@ class ShowHiddenChannels { var myMember = this.MemberUtils.getMember(guild.id, BDFDB.myData.id); var allowedRoles = [], allowedUsers = [], overwrittenRoles = [], deniedRoles = [], deniedUsers = []; var everyoneDenied = false; - for (let id in channel.permissionOverwrites) { + for (let id in channel.permissionOverwrites) if (guild.roles[id]) { if (settings.showAllowedRoles && channel.permissionOverwrites[id].type == "role" && (guild.roles[id].name != "@everyone") && ((channel.permissionOverwrites[id].allow | this.Permissions.VIEW_CHANNEL) == channel.permissionOverwrites[id].allow || (channel.permissionOverwrites[id].allow | this.Permissions.CONNECT) == channel.permissionOverwrites[id].allow)) { if (myMember.roles.includes(id) && !allowed) { if (settings.showOverWrittenRoles) overwrittenRoles.push(guild.roles[id]);