Update FriendNotifications.plugin.js
This commit is contained in:
parent
5e01e8d362
commit
c70680052b
|
@ -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]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue