Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2023-04-04 10:49:35 +02:00
parent bfa6badcbe
commit 93eaaac8f7
1 changed files with 40 additions and 41 deletions

View File

@ -2,7 +2,7 @@
* @name BDFDB
* @author DevilBro
* @authorId 278543574059057154
* @version 3.2.2
* @version 3.2.3
* @description Required Library for DevilBro's Plugins
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -2404,7 +2404,7 @@ module.exports = (_ => {
return false;
};
Internal.findModuleViaData = (moduleStorage, dataStorage, item) => {
if (dataStorage[item]) {
if (!dataStorage[item]) return;
let defaultExport = typeof dataStorage[item].exported != "boolean" ? true : dataStorage[item].exported;
if (dataStorage[item].props) moduleStorage[item] = BDFDB.ModuleUtils.findByProperties(dataStorage[item].props, {defaultExport});
else if (dataStorage[item].protos) moduleStorage[item] = BDFDB.ModuleUtils.findByPrototypes(dataStorage[item].protos, {defaultExport});
@ -2417,7 +2417,8 @@ module.exports = (_ => {
}
if (dataStorage[item].value) moduleStorage[item] = (moduleStorage[item] || {})[dataStorage[item].value];
if (dataStorage[item].assign) moduleStorage[item] = Object.assign({}, moduleStorage[item]);
if (moduleStorage[item]) {
if (!moduleStorage[item]) return;
if (moduleStorage[item][item]) moduleStorage[item] = moduleStorage[item][item];
if (dataStorage[item].funcStrings) moduleStorage[item] = (Object.entries(moduleStorage[item]).find(n => {
if (!n || !n[1]) return;
let funcString = typeof n[1] == "function" ? n[1].toString() : (_ => {try {return JSON.stringify(n[1])}catch(err){return n[1].toString()}})();
@ -2446,8 +2447,6 @@ module.exports = (_ => {
}
});
}
}
}
};
LibraryModules.LanguageStore = BDFDB.ModuleUtils.find(m => m.Messages && m.Messages.IMAGE && m);