## Custom Status and RPC Custom Status ```js const r = new Discord.CustomStatus() .setState('Discord') .setEmoji('πŸ’¬') client.user.setActivity(r.toJSON()); ``` Rich Presence [Custom] ```js const r = new Discord.RichPresence() .setApplicationId('817229550684471297') .setType('STREAMING') .setURL('https://youtube.com/watch?v=dQw4w9WgXcQ') .setState('State') .setName('Name') .setDetails('Details') .setParty({ max: 9, current: 1, id: Discord.getUUID(), }) .setStartTimestamp(Date.now()) .setAssetsLargeImage('929325841350000660') .setAssetsLargeText('Youtube') .setAssetsSmallImage('895316294222635008') .setAssetsSmallText('Bot') .addButton('name', 'https://link.com/') client.user.setActivity(r.toJSON()); ``` Rich Presence with Spotify ```js const r = new Discord.SpotifyRPC(client) .setAssetsLargeImage("spotify:ab67616d00001e02768629f8bc5b39b68797d1bb") // Image ID .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()); ``` You can now add custom images for RPC ! > Tutorial: + Step 1: Send image to Discord + Step 2: Get Image URL ```sh Demo URL: https://cdn.discordapp.com/attachments/820557032016969751/991172011483218010/unknown.png ``` + Step 3: Replace `https://cdn.discordapp.com/` or `https://media.discordapp.net/` with `mp:` ```diff - https://cdn.discordapp.com/attachments/820557032016969751/991172011483218010/unknown.png - https://media.discordapp.net/attachments/820557032016969751/991172011483218010/unknown.png + mp:attachments/820557032016969751/991172011483218010/unknown.png ``` + Step 4: ```js const r = new Discord.RichPresence() .setApplicationId('817229550684471297') .setType('PLAYING') .setURL('https://youtube.com/watch?v=dQw4w9WgXcQ') .setState('State') .setName('Name') .setDetails('Details') .setParty({ max: 9, current: 1, id: Discord.getUUID(), }) .setStartTimestamp(Date.now()) .setAssetsLargeImage('mp:attachments/820557032016969751/991172011483218010/unknown.png') .setAssetsLargeText('Youtube') .setAssetsSmallImage('895316294222635008') .setAssetsSmallText('Bot') .addButton('name', 'https://link.com/') client.user.setActivity(r.toDiscord().game); ``` How to get the Assets ID and Name of the bot (application) ? - Bot: ```js const bot = await client.users.fetch('BotId'); const asset = await bot.application.fetchAssets(); // asset: Array // Document: https://discordjs-self-v13.netlify.app/#/docs/docs/main/typedef/ApplicationAsset ``` - Application > Using Browser (Chrome) with URL: `https://discord.com/api/v9/oauth2/applications/{applicationId}/assets` - More: - You can change the status 5 times every 20 seconds!