Docs(RPC): Update Spotify RPC example

This commit is contained in:
March 7th 2022-07-07 14:59:59 +07:00
parent 189717ac81
commit 578bc0adde

View File

@ -41,16 +41,17 @@ Rich Presence with Spotify
```js
const r = new Discord.SpotifyRPC(client)
.setAssetsLargeImage("spotify:ab67616d00001e02768629f8bc5b39b68797d1bb") // Image ID
.setAssetsSmallImage("spotify:ab6761610000f178049d8aeae802c96c8208f3b7")
.setState('Yunomi, Kizuna AI')
.setDetails('ロボットハート')
.setAssetsSmallImage("spotify:ab6761610000f178049d8aeae802c96c8208f3b7") // Image ID
.setAssetsLargeText('未来茶屋 (vol.1)') // Album Name
.setState('Yunomi; Kizuna AI') // Author
.setDetails('ロボットハート') // Song name
.setStartTimestamp(Date.now())
.setEndTimestamp(Date.now() + 1_000 * (2 * 60 + 56)) // Song length = 2m56s
.setSongId('667eE4CFfNtJloC6Lvmgrx'); // Song ID
client.user.setActivity(r.toJSON());
```
<img src='https://cdn.discordapp.com/attachments/820557032016969751/994501676117524531/unknown.png'>
<img src='https://cdn.discordapp.com/attachments/820557032016969751/994501747181621308/unknown.png'>
<img src='https://cdn.discordapp.com/attachments/820557032016969751/994512257914515456/unknown.png'>
<img src='https://cdn.discordapp.com/attachments/820557032016969751/994512258128420944/unknown.png'>