From 781c0a83d5046761c5c1706e8551772bd27e019f Mon Sep 17 00:00:00 2001 From: Mirco Wittrien <23700969+mwittrien@users.noreply.github.com> Date: Fri, 8 Apr 2022 10:31:22 +0200 Subject: [PATCH] permission fix --- Library/0BDFDB.plugin.js | 6 +++--- Library/_res/0BDFDB.data.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index b7ef010fba..502a220f31 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -2,7 +2,7 @@ * @name BDFDB * @author DevilBro * @authorId 278543574059057154 - * @version 2.2.5 + * @version 2.2.6 * @description Required Library for DevilBro's Plugins * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -19,7 +19,7 @@ module.exports = (_ => { "info": { "name": "BDFDB", "author": "DevilBro", - "version": "2.2.5", + "version": "2.2.6", "description": "Required Library for DevilBro's Plugins" } }; @@ -3209,7 +3209,7 @@ module.exports = (_ => { if (!BDFDB.DiscordConstants.Permissions[permission]) BDFDB.LogUtils.warn([permission, "not found in Permissions"]); else { let channel = Internal.LibraryModules.ChannelStore.getChannel(channelId); - if (channel) return Internal.LibraryModules.PermissionRoleUtils.can(BDFDB.DiscordConstants.Permissions[permission], id, channel); + if (channel) return Internal.LibraryModules.PermissionRoleUtils.can(BDFDB.DiscordConstants.Permissions[permission], id, channel) || Internal.LibraryModules.PermissionRoleUtils.can({permission: BDFDB.DiscordConstants.Permissions[permission], user: id, context: channel}); } return false; }; diff --git a/Library/_res/0BDFDB.data.json b/Library/_res/0BDFDB.data.json index 6964e4cd91..4c1e49e880 100644 --- a/Library/_res/0BDFDB.data.json +++ b/Library/_res/0BDFDB.data.json @@ -97,8 +97,8 @@ "NotificationSettingsUtils": {"props": ["setDesktopType", "setTTSType"]}, "NotificationUtils": {"props": ["makeTextChatNotification", "shouldNotify"]}, "PlatformUtils": {"props": ["isWindows", "isLinux"]}, + "PermissionRoleUtils": {"props": ["can", "ALLOW", "DENY"]}, "PermissionUtils": {"props": ["getChannelPermissions", "can"]}, - "PermissionRoleUtils": {"props": ["canEveryone", "can"]}, "PreferencesContext": {"props": ["AccessibilityPreferencesContext"]}, "QueryUtils": {"props": ["AutocompleterQuerySymbols", "AutocompleterResultTypes"]}, "ReactionEmojiUtils": {"props": ["getReactionEmojiName", "getReactionEmojiName"]},