Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PresenceGameBuilder

Hierarchy

  • PresenceGameBuilder

Implements

  • APIActivityData

Index

Constructors

constructor

Properties

Optional application_id

application_id: undefined | string

Application id for the game.

since

0.0.1

Optional assets

assets: APIActivityDataAssets

Images for the presence and their hover texts.

since

0.0.1

see

https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets

created_at

created_at: number

Unix timestamp of when the activity was added to the user's session.

since

0.0.1

Optional details

details: string | null

What the player is currently doing.

since

0.0.1

Optional emoji

emoji: APIActivityDataEmoji | null

The emoji used for a custom status.

since

0.0.1

see

https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji

Optional flags

Activity flags ORd together, describes what the payload includes.

since

0.0.1

Optional instance

instance: undefined | false | true

Whether or not the activity is an instanced game session.

since

0.0.1

name

name: string

The activity's name.

since

0.0.1

Optional party

party: APIActivityDataParty

Information for the current party of the player.

since

0.0.1

see

https://discord.com/developers/docs/topics/gateway#activity-object-activity-party

Optional secrets

secrets: APIActivityDataSecrets

Secrets for Rich Presence joining and spectating.

since

0.0.1

see

https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets

Optional state

state: string | null

The user's current party status.

since

0.0.1

Optional timestamps

timestamps: APIActivityDataTimestamp

Unix timestamps for start and/or end of the game.

since

0.0.1

type

type: number

Optional url

url: string | null

Stream url, is validated when type is 1.

since

0.0.1

Methods

setApplicationID

  • setApplicationID(applicationID: string): this

setAssets

  • setAssets(assets: APIActivityDataAssets): this

setCreatedAt

  • setCreatedAt(createdAt: number): this

setDetails

  • setDetails(details: string | null): this

setEmoji

  • setEmoji(emoji: APIActivityDataEmoji | null): this

setFlags

setInstance

  • setInstance(instance: boolean): this

setName

  • setName(name: string): this

setParty

  • setParty(party: APIActivityDataParty): this

setSecrets

  • setSecrets(secrets: APIActivityDataSecrets): this

setState

  • setState(state: string | null): this

setTimestamps

  • setTimestamps(timestamps: APIActivityDataTimestamp): this

setType

  • setType(type: ActivityType): this

setURL

  • setURL(url: string | null): this

Generated using TypeDoc