Presence
- class Presence
Tracks a user’s current gateway presence in a guild. Presence data is cache-only and requires the privileged
GUILD_PRESENCESgateway intent. It may be absent until Discord sends a presence update.Properties
Property
Type
Description
activitiesCurrent activities sent by Discord.
clientStatusPer-platform status sent by Discord.
guildIdGuild ID this presence belongs to.
rawRaw Discord presence payload.
statusThe user’s current status.
userUser object from the presence update, or
nullwhen only cached status is available.userIdUser ID this presence belongs to.
Methods
-
async Presence.fetchMember() Promise<
GuildMember| null> Fetch the guild member for this presence.
-
Presence.getCustomStatus()
PresenceActivity| null Get the custom status activity, or
nullif not set.- Returns:
The custom status activity object, or null.
-
Presence.getPrimaryActivity()
PresenceActivity| null Get the first non-custom activity, or
nullif none.- Returns:
The primary activity object, or null.
- Presence.isDnd() boolean
Returns whether this presence is currently set to do-not-disturb.
- Returns:
Whether the check passed.
- Presence.isIdle() boolean
Returns whether this presence is currently idle.
- Returns:
Whether the check passed.
-
async Presence.fetchMember() Promise<