fix default presences again, remove redundant extras in PresenceStore

This commit is contained in:
Amish Shah 2018-08-11 10:19:31 +01:00
parent f5ea673ebd
commit 3c2eaff226
No known key found for this signature in database
GPG key ID: 904349C1207D7967
2 changed files with 7 additions and 2 deletions

View file

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

View file

@ -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,
});
}
/**