Presence

class Presence()

Tracks a user’s current gateway presence in a guild. Presence data is cache-only and requires the privileged GUILD_PRESENCES gateway intent. It may be absent until Discord sends a presence update.

exported from lib.weeble.d

Properties

Presence.activities

type: readonly PresenceActivity[]

Current activities sent by Discord.

Presence.clientStatus

type: readonly ClientStatus

Per-platform status sent by Discord.

Presence.guildId

type: readonly string

Guild ID this presence belongs to.

Presence.raw

type: readonly Record<string, unknown>

Raw Discord presence payload.

Presence.status

type: readonly string

The user’s current status.

Presence.user

type: readonly User | null

User object from the presence update, or null when only cached status is available.

Presence.userId

type: readonly string

User ID this presence belongs to.

Methods

async Presence.fetchGuild() Promise<Guild>

Fetch the guild for this presence.

async Presence.fetchMember() Promise<GuildMember | null>

Fetch the guild member for this presence.

async Presence.fetchUser() Promise<User>

Fetch the full user for this presence.

Presence.getCustomStatus() PresenceActivity | null

Get the custom status activity, or null if not set.

Returns:

The custom status activity object, or null.

Presence.getPrimaryActivity() PresenceActivity | null

Get the first non-custom activity, or null if 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.

Presence.isOffline() boolean

Returns whether this presence is currently offline.

Returns:

Whether the check passed.

Presence.isOnline() boolean

Returns whether this presence is currently online.

Returns:

Whether the check passed.