Preview environment

class Activity

export class Activity

Represents an activity that is part of a user's presence.

applicationId : Snowflake | null

The id of the application associated with this activity

Assets for rich presence

buttons : string[]

The labels of the buttons of this rich presence

readonly
createdAt : Date

The time the activity was created at

createdTimestamp : number

Creation date of the activity

details : string | null

Details about the activity

emoji : Emoji | null

Emoji for a custom activity

Flags that describe the activity

name : string

The activity's name

party : { id: string | null; size: [number, number]; } | null

Party of the activity

readonly
presence : Presence

The presence of the Activity

state : string | null

State of the activity

syncId : string | null

The sync id of the activity This property is not documented by Discord and represents the track id in spotify activities.

timestamps : { start: Date | null; end: Date | null; } | null

Timestamps for the activity

The activity status's type

url : string | null

If the activity is being streamed, a link to the stream

equals(
activity: Activity
) : boolean

Whether this activity is equal to another activity.

toString() : string

When concatenated with a string, this automatically returns the activity's name instead of the Activity object.