RichPresence
classe · Source
Constructor
Parameters
| Name | Type | Description |
|---|---|---|
client | Client | Discord client |
data? | RichPresence | RichPresence to clone or raw data Default: {}. |
Methods
setup
Sets the status from a JSON object Parameters
| Name | Type | Description |
|---|---|---|
data | RichPresence | data |
| Source |
setAssetsLargeImage
Set the large image of this activity Parameters
| Name | Type | Description |
|---|---|---|
image | RichPresenceImage | The large image asset's id |
Returns: RichPresenceSource
setAssetsSmallImage
Set the small image of this activity Parameters
| Name | Type | Description |
|---|---|---|
image | RichPresenceImage | The small image asset's id |
Returns: RichPresenceSource
setAssetsLargeText
Hover text for the large image Parameters
| Name | Type | Description |
|---|---|---|
text | string | Assets text |
Returns: RichPresenceSource
setAssetsSmallText
Hover text for the small image Parameters
| Name | Type | Description |
|---|---|---|
text | string | Assets text |
Returns: RichPresenceSource
setName
Set the name of the activity Parameters
| Name | Type | Description |
|---|---|---|
name | string | The activity's name |
Returns: RichPresenceSource
setURL
If the activity is being streamed, a link to the stream Parameters
| Name | Type | Description |
|---|---|---|
url | string | URL of the stream |
Returns: RichPresenceSource
setType
The activity status's type Parameters
| Name | Type | Description |
|---|---|---|
type | ActivityTypes | The type of activity |
Returns: RichPresenceSource
setApplicationId
Set the application id of this activity Parameters
| Name | Type | Description |
|---|---|---|
id | Snowflake | Bot's id |
Returns: RichPresenceSource
setState
Set the state of the activity Parameters
| Name | Type | Description |
|---|---|---|
state | string | The state of the activity |
Returns: RichPresenceSource
setDetails
Set the details of the activity Parameters
| Name | Type | Description |
|---|---|---|
details | string | The details of the activity |
Returns: RichPresenceSource
setParty
Set the party of this activity Parameters
| Name | Type | Description |
|---|---|---|
party | RichParty | The party to be displayed |
Returns: RichPresenceSource
setStartTimestamp
Sets the start timestamp of the activity Parameters
| Name | Type | Description |
|---|---|---|
timestamp | Date | number | null | The timestamp of the start of the activity |
Returns: RichPresenceSource
setEndTimestamp
Sets the end timestamp of the activity Parameters
| Name | Type | Description |
|---|---|---|
timestamp | Date | number | null | The timestamp of the end of the activity |
Returns: RichPresenceSource
setButtons
Set the buttons of the rich presence Parameters
| Name | Type | Description |
|---|---|---|
button | RichButton | A list of buttons to set |
Returns: RichPresenceSource
setPlatform
The platform the activity is being played on Parameters
| Name | Type | Description |
|---|---|---|
platform | ActivityPlatform | null | Any platform |
Returns: RichPresenceSource
setJoinSecret
Secrets for rich presence joining and spectating (send-only) Parameters
| Name | Type | Description |
|---|---|---|
join | string | Secrets for rich presence joining |
Returns: RichPresenceSource
addButton
Add a button to the rich presence Parameters
| Name | Type | Description |
|---|---|---|
name | string | The name of the button |
url | string | The url of the button |
Returns: RichPresenceSource
toJSON
Convert the rich presence to a JSON object Returns: ObjectSource
toString
When concatenated with a string, this automatically returns the activities' name instead of the Activity object. Returns: stringSource
getExternal
Retrieves external assets from a RichPresence Parameters
| Name | Type | Description |
|---|---|---|
client | Client | The Discord client instance. |
applicationId | Snowflake | The application ID associated with the Rich Presence. |
images | string | 1 or 2 external image URLs (not hosted by Discord). |
Returns: Promise<Array<ExternalAssets>>Source