Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2023-04-04 10:55:26 +02:00
parent b14b7f2e68
commit 5a7e598d34
1 changed files with 40 additions and 41 deletions

View File

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