mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
refactor(Presences): remove from User, nullable on GuildMember (#6055)
as well as on Client#presenceUpdate
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const Base = require('./Base');
|
||||
const { Presence } = require('./Presence');
|
||||
const VoiceState = require('./VoiceState');
|
||||
const TextBasedChannel = require('./interfaces/TextBasedChannel');
|
||||
const { Error } = require('../errors');
|
||||
@@ -133,19 +132,11 @@ class GuildMember extends Base {
|
||||
|
||||
/**
|
||||
* The presence of this guild member
|
||||
* @type {Presence}
|
||||
* @type {?Presence}
|
||||
* @readonly
|
||||
*/
|
||||
get presence() {
|
||||
return (
|
||||
this.guild.presences.cache.get(this.id) ??
|
||||
new Presence(this.client, {
|
||||
user: {
|
||||
id: this.id,
|
||||
},
|
||||
guild: this.guild,
|
||||
})
|
||||
);
|
||||
return this.guild.presences.resolve(this.id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user