Update ShowHiddenChannels.plugin.js

This commit is contained in:
Mirco Wittrien 2019-06-12 10:36:40 +02:00
parent a5d874242c
commit 666121a8c7
1 changed files with 1 additions and 1 deletions

View File

@ -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]);