Update UserNotes.plugin.js

This commit is contained in:
Mirco Wittrien 2021-03-06 20:18:38 +01:00
parent 3fb7843413
commit 8886c3b92c
1 changed files with 4 additions and 1 deletions

View File

@ -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");
});
}