From 8886c3b92c8e85dcb42c3e979b6d7c8de4dc0637 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sat, 6 Mar 2021 20:18:38 +0100 Subject: [PATCH] Update UserNotes.plugin.js --- Plugins/UserNotes/UserNotes.plugin.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Plugins/UserNotes/UserNotes.plugin.js b/Plugins/UserNotes/UserNotes.plugin.js index 5a64e595eb..2f29131f8b 100644 --- a/Plugins/UserNotes/UserNotes.plugin.js +++ b/Plugins/UserNotes/UserNotes.plugin.js @@ -1,6 +1,9 @@ /** * @name UserNotes + * @author DevilBro * @authorId 278543574059057154 + * @version 1.0.6 + * @description Allows you to write User Notes locally * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien * @patreon https://www.patreon.com/MircoWittrien @@ -32,7 +35,7 @@ module.exports = (_ => { downloadLibrary () { require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => { - if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => BdApi.showToast("Finished downloading BDFDB Library", {type: "success"})); + if (!e && b && r.statusCode == 200) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => BdApi.showToast("Finished downloading BDFDB Library", {type: "success"})); else BdApi.alert("Error", "Could not download BDFDB Library Plugin. Try again later or download it manually from GitHub: https://mwittrien.github.io/downloader/?library"); }); }