From 19141184a03238621a650f21c0024fd343686936 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien <23700969+mwittrien@users.noreply.github.com> Date: Sun, 10 Apr 2022 10:24:21 +0200 Subject: [PATCH] stuff --- Library/0BDFDB.plugin.js | 7 ++++--- Plugins/BDFDB/BDFDB.plugin.js | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index cb12f2017f..33c6592de5 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -2,7 +2,7 @@ * @name BDFDB * @author DevilBro * @authorId 278543574059057154 - * @version 2.2.9 + * @version 2.3.0 * @description Required Library for DevilBro's Plugins * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -19,7 +19,7 @@ module.exports = (_ => { "info": { "name": "BDFDB", "author": "DevilBro", - "version": "2.2.9", + "version": "2.3.0", "description": "Required Library for DevilBro's Plugins" }, "rawUrl": "https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", @@ -999,7 +999,8 @@ module.exports = (_ => { try { let config = JSON.parse(fs.readFileSync(path)); if (config && Object.keys(config).some(n => !(n == "all" || parseInt(n)))) { - try {fs.writeFileSync(path, JSON.stringify(!sync ? (plugin.neverSyncData ? {[BDFDB.UserUtils.me.id]: config} : {all: config, [BDFDB.UserUtils.me.id]: config}) : {all: config}, null, " "));} + config = !sync ? (plugin.neverSyncData ? {[BDFDB.UserUtils.me.id]: config} : {all: config, [BDFDB.UserUtils.me.id]: config}) : {all: config}; + try {fs.writeFileSync(path, JSON.stringify(config, null, " "));} catch (err) {} } return config && config[sync ? "all" : BDFDB.UserUtils.me.id] || {}; diff --git a/Plugins/BDFDB/BDFDB.plugin.js b/Plugins/BDFDB/BDFDB.plugin.js index cb12f2017f..33c6592de5 100644 --- a/Plugins/BDFDB/BDFDB.plugin.js +++ b/Plugins/BDFDB/BDFDB.plugin.js @@ -2,7 +2,7 @@ * @name BDFDB * @author DevilBro * @authorId 278543574059057154 - * @version 2.2.9 + * @version 2.3.0 * @description Required Library for DevilBro's Plugins * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -19,7 +19,7 @@ module.exports = (_ => { "info": { "name": "BDFDB", "author": "DevilBro", - "version": "2.2.9", + "version": "2.3.0", "description": "Required Library for DevilBro's Plugins" }, "rawUrl": "https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", @@ -999,7 +999,8 @@ module.exports = (_ => { try { let config = JSON.parse(fs.readFileSync(path)); if (config && Object.keys(config).some(n => !(n == "all" || parseInt(n)))) { - try {fs.writeFileSync(path, JSON.stringify(!sync ? (plugin.neverSyncData ? {[BDFDB.UserUtils.me.id]: config} : {all: config, [BDFDB.UserUtils.me.id]: config}) : {all: config}, null, " "));} + config = !sync ? (plugin.neverSyncData ? {[BDFDB.UserUtils.me.id]: config} : {all: config, [BDFDB.UserUtils.me.id]: config}) : {all: config}; + try {fs.writeFileSync(path, JSON.stringify(config, null, " "));} catch (err) {} } return config && config[sync ? "all" : BDFDB.UserUtils.me.id] || {};