diff --git a/Plugins/FriendNotifications/FriendNotifications.plugin.js b/Plugins/FriendNotifications/FriendNotifications.plugin.js index eaec7ebde3..6111bc33d3 100644 --- a/Plugins/FriendNotifications/FriendNotifications.plugin.js +++ b/Plugins/FriendNotifications/FriendNotifications.plugin.js @@ -1,6 +1,9 @@ /** * @name FriendNotifications + * @author DevilBro * @authorId 278543574059057154 + * @version 1.6.2 + * @description Shows a Notification when a Friend or a User, you choose to observe, changes their Status * @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://github.com/mwittrien/BetterDiscordAddons/tree/master/Library/"); }); }