Update 0BDFDB.plugin.js
This commit is contained in:
parent
9fbe007074
commit
dc83e785a6
|
@ -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 ? "" : {};
|
||||
|
|
Loading…
Reference in New Issue