From 3c2eaff22655fe33d8de3bed410b4b3b08fe4c9d Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 11 Aug 2018 10:19:31 +0100 Subject: [PATCH] fix default presences again, remove redundant extras in PresenceStore --- src/stores/PresenceStore.js | 2 +- src/structures/GuildMember.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/stores/PresenceStore.js b/src/stores/PresenceStore.js index 15fc9f124..dc758d3c3 100644 --- a/src/stores/PresenceStore.js +++ b/src/stores/PresenceStore.js @@ -12,7 +12,7 @@ class PresenceStore extends DataStore { add(data, cache) { const existing = this.get(data.user.id); - return existing ? existing.patch(data) : super.add(data, cache, { id: data.user.id }); + return existing ? existing.patch(data) : super.add(data, cache); } /** diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index d24670b64..9b6beee74 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -115,7 +115,12 @@ class GuildMember extends Base { * @readonly */ get presence() { - return this.guild.presences.get(this.id) || new Presence(this.client, { user: { id: this.id } }); + return this.guild.presences.get(this.id) || new Presence(this.client, { + user: { + id: this.id, + }, + guild: this, + }); } /**