Update ShowHiddenChannels.plugin.js

This commit is contained in:
Mirco Wittrien 2021-07-02 23:34:29 +02:00
parent e543b35c04
commit 3f53ed37ea
1 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
* @name ShowHiddenChannels
* @author DevilBro
* @authorId 278543574059057154
* @version 3.0.0
* @version 3.0.1
* @description Displays all hidden Channels, which can't be accessed due to Role Restrictions, this won't allow you to read them (impossible)
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,12 +17,12 @@ module.exports = (_ => {
"info": {
"name": "ShowHiddenChannels",
"author": "DevilBro",
"version": "3.0.0",
"version": "3.0.1",
"description": "Displays all hidden Channels, which can't be accessed due to Role Restrictions, this won't allow you to read them (impossible)"
},
"changeLog": {
"improved": {
"Sort Order": "Added a third option, which allows you to sort hidden channels in their native category BUT at the bottom of the category's own list"
"fixed": {
"Denied Users": "Fixed an Issue that caused denied Users not to be Listed together with denied Roles"
}
}
};
@ -579,7 +579,7 @@ module.exports = (_ => {
let addUser = (id, users) => {
let user = BDFDB.LibraryModules.UserStore.getUser(id);
if (user) allowedUsers.push(Object.assign({}, user, BDFDB.LibraryModules.MemberStore.getMember(guild.id, id) || {}));
if (user) users.push(Object.assign({}, user, BDFDB.LibraryModules.MemberStore.getMember(guild.id, id) || {}));
else users.push({id: id, username: `UserId: ${id}`, fetchable: true});
};
let checkPerm = permString => {
@ -598,7 +598,7 @@ module.exports = (_ => {
deniedRoles.push(guild.roles[id]);
if (guild.roles[id] && guild.roles[id].name == "@everyone") everyoneDenied = true;
}
else if ((channel.permissionOverwrites[id].type == BDFDB.DiscordConstants.PermissionOverrideType.MEMBER || overrideTypes[channel.permissionOverwrites[id].type] == BDFDB.DiscordConstants.PermissionOverrideType.MEMBER) && checkPerm(channel.permissionOverwrites[id].den)) {
else if ((channel.permissionOverwrites[id].type == BDFDB.DiscordConstants.PermissionOverrideType.MEMBER || overrideTypes[channel.permissionOverwrites[id].type] == BDFDB.DiscordConstants.PermissionOverrideType.MEMBER) && checkPerm(channel.permissionOverwrites[id].deny)) {
addUser(id, deniedUsers);
}
}