From 27b9d16aabd9c0ea269da5cdeac9fd98d2771974 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 4 Nov 2022 19:11:19 +0100 Subject: [PATCH] Update 0BDFDB.plugin.js --- Library/0BDFDB.plugin.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index 21c47ab1ce..e4fb4e21ab 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -2,7 +2,7 @@ * @name BDFDB * @author DevilBro * @authorId 278543574059057154 - * @version 2.9.6 + * @version 2.9.7 * @description Required Library for DevilBro's Plugins * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -1228,7 +1228,7 @@ module.exports = (_ => { s1 = config.ignoreCase ? s1.toString().toLowerCase() : s1.toString(); return config.hasNot ? s1.indexOf(s2) == -1 : s1.indexOf(s2) > -1; }; - return [strings].flat(10).filter(n => typeof n == "string").map(config.ignoreCase ? (n => n.toLowerCase()) : (n => n)).every(string => (typeof module == "function" || typeof module == "strings") && (check(module, string) || typeof module.__originalMethod == "function" && check(module.__originalMethod, string) || typeof module.__originalFunction == "function" && check(module.__originalFunction, string)) || BDFDB.ObjectUtils.is(module) && typeof module.type == "function" && check(module.type, string)); + return [strings].flat(10).filter(n => typeof n == "string").map(config.ignoreCase ? (n => n.toLowerCase()) : (n => n)).every(string => module && ((typeof module == "function" || typeof module == "strings") && (check(module, string) || typeof module.__originalFunction == "function" && check(module.__originalFunction, string)) || typeof module.type == "function" && check(module.type, string) || (typeof module == "function" || typeof module == "object") && module.prototype && Object.keys(module.prototype).filter(n => n.indexOf("render") == 0).some(n => check(module.prototype[n], string)))); }; Internal.checkModuleProps = function (module, properties, config = {}) { return [properties].flat(10).filter(n => typeof n == "string").every(prop => { @@ -2301,7 +2301,7 @@ module.exports = (_ => { } if (type == "instead" && callInsteadAfterwards && !stopInsteadCall) BDFDB.TimeUtils.suppress(data.callOriginalMethod, `originalMethod of ${methodName} in ${name}`, {name: "Discord"})(); - if (type != "before") return (methodName == "render" || methodName == "default") && data.returnValue === undefined ? null : data.returnValue; + if (type != "before") return (methodName == "render" || methodName == "type") && data.returnValue === undefined ? null : data.returnValue; }); module[methodName].BDFDB_Patches = patches; patches[type] = {plugins: {}, cancel: _ => { @@ -8343,7 +8343,7 @@ module.exports = (_ => { returnvalue: e.returnValue, component: e.methodArguments[0], name: type, - methodname: "default", + methodname: "render", patchtypes: ["before"] }); if (hasArgumentChildren) {