From 64061b6f2db06f3c0ae92172ce1bf567a552fe64 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Wed, 25 Oct 2023 16:33:24 +0200 Subject: [PATCH] Update 0BDFDB.plugin.js --- Library/0BDFDB.plugin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index adfbe59252..edbf166a6e 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -1369,13 +1369,15 @@ module.exports = (_ => { let amount = Object.keys(m).length; return (!config.length || (config.smaller ? amount < config.length : amount == config.length)) && [props].flat(10).every(prop => typeof m[prop] == "string") && m; }, {all: config.all, defaultExport: config.defaultExport}); - return config.all && firstReturn && firstReturn.length > 0 || !config.all && firstReturn || BDFDB.ModuleUtils.find(m => { + if (!config.all && firstReturn) return firstReturn; + let secondReturn = BDFDB.ModuleUtils.find(m => { if (typeof m != "function") return false; let stringified = m.toString().replace(/\s/g, ""); if (stringified.indexOf("e=>{e.exports={") != 0 && stringified.indexOf("function(e,t,o){\"usestrict\";e.exports={") != 0) return false; let amount = stringified.split(":\"").length - 1; return (!config.length || (config.smaller ? amount < config.length : amount == config.length)) && [props].flat(10).every(string => stringified.indexOf(`${string}:`) > -1) && m; }, {onlySearchUnloaded: true, all: config.all, defaultExport: config.defaultExport}); + return BDFDB.ArrayUtils.removeCopies([firstReturn].concat(secondReturn).flat(10)); }; Internal.DiscordConstants = new Proxy(DiscordConstants, {