Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2021-01-28 15:44:44 +01:00
parent 9fbe007074
commit dc83e785a6
1 changed files with 1 additions and 1 deletions

View File

@ -474,7 +474,7 @@ module.exports = (_ => {
BDFDB.BDUtils.getSettings = function (key) {
if (!window.BdApi) return {};
if (typeof key == "string") return BdApi.isSettingEnabled(...key.split("."));
else return !isBeta ? BDFDB.ObjectUtils.get(BdApi.getBDData("settings"), `${BDFDB.DiscordUtils.getBuilt()}.settings`) : BdApi.settings.map(n => n.settings.map(m => m.settings.map(l => ({id: [n.id, m.id, l.id].join("."), value: l.value})))).flat(10).reduce((newObj, setting) => (newObj[setting.id] = setting.value, newObj), {});
else return !isBeta && typeof BdApi.getBDData == "function" ? BDFDB.ObjectUtils.get(BdApi.getBDData("settings"), `${BDFDB.DiscordUtils.getBuilt()}.settings`) : (BDFDB.ArrayUtils.is(BdApi.settings) ? BdApi.settings.map(n => n.settings.map(m => m.settings.map(l => ({id: [n.id, m.id, l.id].join("."), value: l.value})))).flat(10).reduce((newObj, setting) => (newObj[setting.id] = setting.value, newObj), {}) : {});
};
BDFDB.BDUtils.getSettingsProperty = function (property, key) {
if (!window.BdApi || !isBeta) return key ? "" : {};