mirror of
https://github.com/danbulant/discord.js
synced 2026-06-07 16:52:16 +00:00
fix(Presence): pass client and default to offline (#2071)
This commit is contained in:
parent
50ad66f513
commit
a62d1e954d
3 changed files with 3 additions and 3 deletions
|
|
@ -125,7 +125,7 @@ class GuildMember extends Base {
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get presence() {
|
get presence() {
|
||||||
return this.frozenPresence || this.guild.presences.get(this.id) || new Presence();
|
return this.frozenPresence || this.guild.presences.get(this.id) || new Presence(this.client);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ class Presence {
|
||||||
* * **`dnd`** - user is in Do Not Disturb
|
* * **`dnd`** - user is in Do Not Disturb
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
this.status = data.status || this.status;
|
this.status = data.status || this.status || 'offline';
|
||||||
|
|
||||||
const activity = data.game || data.activity;
|
const activity = data.game || data.activity;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ class User extends Base {
|
||||||
for (const guild of this.client.guilds.values()) {
|
for (const guild of this.client.guilds.values()) {
|
||||||
if (guild.presences.has(this.id)) return guild.presences.get(this.id);
|
if (guild.presences.has(this.id)) return guild.presences.get(this.id);
|
||||||
}
|
}
|
||||||
return new Presence();
|
return new Presence(this.client);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue