Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2021-04-16 21:43:46 +02:00
parent 59f9fd2b99
commit 286719f1f2
1 changed files with 4 additions and 5 deletions

View File

@ -2,7 +2,7 @@
* @name BDFDB
* @author DevilBro
* @authorId 278543574059057154
* @version 1.5.6
* @version 1.5.7
* @description Required Library for DevilBro's Plugins
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -22,7 +22,7 @@ module.exports = (_ => {
"info": {
"name": "BDFDB",
"author": "DevilBro",
"version": "1.5.6",
"version": "1.5.7",
"description": "Required Library for DevilBro's Plugins"
},
"rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`,
@ -2063,7 +2063,7 @@ module.exports = (_ => {
if (!plugin || !BDFDB.ObjectUtils.is(module) || !methodNames || !BDFDB.ObjectUtils.is(patchMethods)) return null;
patchMethods = BDFDB.ObjectUtils.filter(patchMethods, type => InternalData.ModuleUtilsConfig.PatchTypes.includes(type), true);
if (BDFDB.ObjectUtils.isEmpty(patchMethods)) return null;
const pluginName = typeof plugin === "string" ? plugin : plugin.name;
const pluginName = (typeof plugin === "string" ? plugin : plugin.name) || "";
const pluginVersion = typeof plugin === "string" ? "" : plugin.version;
const pluginId = pluginName.toLowerCase();
let patchPriority = !isNaN(config.priority) ? config.priority : (BDFDB.ObjectUtils.is(plugin) && !isNaN(plugin.patchPriority) ? plugin.patchPriority : 5);
@ -7921,11 +7921,10 @@ module.exports = (_ => {
BDFDB.TimeUtils.clear(languageChangeTimeout);
languageChangeTimeout = BDFDB.TimeUtils.timeout(_ => {
for (let pluginName in PluginStores.loaded) if (PluginStores.loaded[pluginName].started) BDFDB.PluginUtils.translate(PluginStores.loaded[pluginName]);
BDFDB.PatchUtils.patch(this, LibraryModules.SettingsUtils, "updateLocalSettings", {after: translateAllNew});
}, 10000);
}
};
if (LibraryModules.SettingsUtils) BDFDB.PatchUtils.patch(this, LibraryModules.SettingsUtils, "updateLocalSettings", {after: translateAllNew});
if (LibraryModules.SettingsUtils) BDFDB.PatchUtils.patch(BDFDB, LibraryModules.SettingsUtils, "updateLocalSettings", {after: translateAllNew});
InternalBDFDB.onSettingsClosed = function () {
if (InternalBDFDB.SettingsUpdated) {