SpotifyRPC
classe · SourceExtends: RichPresence
Constructor
Parameters
| Name | Type | Description |
|---|---|---|
client | Client | Discord Client |
options? | SpotifyRPC | Options for the Spotify RPC |
Properties
metadata
Spotify metadata Source
Methods
setup
Sets the status from a JSON object Parameters
| Name | Type | Description |
|---|---|---|
options | SpotifyRPC | data |
| Source |
setSongId
Set Spotify song id to sync with Parameters
| Name | Type | Description |
|---|---|---|
id | string | Song id |
Returns: SpotifyRPCSource
addArtistId
Add the artist id Parameters
| Name | Type | Description |
|---|---|---|
id | string | Artist id |
Returns: SpotifyRPCSource
setArtistIds
Set the artist ids Parameters
| Name | Type | Description |
|---|---|---|
ids | string | Array<string> | Artist ids |
Returns: SpotifyRPCSource
setAlbumId
Set the album id Parameters
| Name | Type | Description |
|---|---|---|
id | string | Album id |
Returns: SpotifyRPCSource
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