From c70680052bad33ba06fd00e0e3f0ba2ab890c0a3 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 5 Mar 2021 14:14:11 +0100 Subject: [PATCH] Update FriendNotifications.plugin.js --- Plugins/FriendNotifications/FriendNotifications.plugin.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Plugins/FriendNotifications/FriendNotifications.plugin.js b/Plugins/FriendNotifications/FriendNotifications.plugin.js index 04f022863d..eaec7ebde3 100644 --- a/Plugins/FriendNotifications/FriendNotifications.plugin.js +++ b/Plugins/FriendNotifications/FriendNotifications.plugin.js @@ -1,9 +1,6 @@ /** * @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 @@ -35,7 +32,7 @@ module.exports = (_ => { downloadLibrary () { require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => { - 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"})); + 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"})); 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/"); }); } @@ -714,6 +711,7 @@ module.exports = (_ => { notificationSounds = BDFDB.DataUtils.get(this, "notificationsounds"); observedUsers = Object.assign({}, BDFDB.DataUtils.load(this, "nonfriends"), BDFDB.DataUtils.load(this, "friends")); + delete observedUsers[BDFDB.UserUtils.me.id]; for (let id in observedUsers) userStatusStore[id] = this.getStatusWithMobileAndActivity(id, observedUsers[id]);