Skip to content

Activity ​

classe · Source

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

Properties ​

presence ​

readonly

presence: Presence

The presence of the Activity Source

id ​

id: string

The activity's id Source

name ​

name: string

The activity's name Source

type ​

type: ActivityType

The activity status's type Source

url ​

nullable

url: string

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

createdTimestamp ​

createdTimestamp: number

Creation date of the activity Source

sessionId ​

nullable

sessionId: string

The game's or Spotify session's id Source

platform ​

nullable

platform: ActivityPlatform

The platform the game is being played on Source

timestamps ​

nullable

timestamps: ActivityTimestamps

Timestamps for the activity Source

applicationId ​

nullable

applicationId: Snowflake

The id of the application associated with this activity Source

details ​

nullable

details: string

Details about the activity Source

state ​

nullable

state: string

State of the activity Source

syncId ​

nullable

syncId: string

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

flags ​

flags: Readonly<ActivityFlags>

Flags that describe the activity Source

buttons ​

buttons: Array<string>

The labels of the buttons of this rich presence Source

emoji ​

nullable

emoji: EmojiIdentifierResolvable

Emoji for a custom activity Source

party ​

nullable

party: ActivityParty

Party of the activity Source

assets ​

nullable

assets: RichPresenceAssets

Assets for rich presence Source

createdAt ​

readonly

createdAt: Date

The time the activity was created at Source

Methods ​

equals ​

equals(activity: Activity): boolean

Whether this activity is equal to another activity. Parameters

NameTypeDescription
activityActivityThe activity to compare with

Returns: booleanSource

toString ​

toString(): string

When concatenated with a string, this automatically returns the activities' name instead of the Activity object. Returns: stringSource

Unofficial software. Not affiliated with or supported by Discord.