mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
fix default presences again, remove redundant extras in PresenceStore
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user