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
2 changed files with 7 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ class PresenceStore extends DataStore {
add(data, cache) { add(data, cache) {
const existing = this.get(data.user.id); 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 * @readonly
*/ */
get presence() { 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,
});
} }
/** /**