From 11fff76625682cfed1d5d4a01ffdb1e9f14a1d37 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sat, 16 Jul 2022 15:29:30 +0700 Subject: [PATCH] Update RichPresence.md --- Document/RichPresence.md | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/Document/RichPresence.md b/Document/RichPresence.md index 77ba2e3..38d4ff5 100644 --- a/Document/RichPresence.md +++ b/Document/RichPresence.md @@ -56,6 +56,8 @@ client.user.setActivity(r.toJSON()); > Tutorial: +## Method 1: + + Step 1: Send image to Discord @@ -103,8 +105,50 @@ const r = new Discord.RichPresence() client.user.setActivity(r.toJSON()); ``` +## Method 2: (Discord URL, 2.3.78+) + +```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('https://cdn.discordapp.com/attachments/820557032016969751/991172011483218010/unknown.png') + .setAssetsLargeText('Youtube') + .setAssetsSmallImage('895316294222635008') + .setAssetsSmallText('Bot') + .addButton('name', 'https://link.com/') +client.user.setActivity(r.toJSON()); +``` + +## Method 3 (Custom URL, 2.3.78+) + +```js +const rpc_ = new Discord.RichPresence(); +const imageSet = await rpc.getExternal(client, '820344593357996092', 'https://musedash.moe/covers/papipupipupipa_cover.hash.93ae31d41.png', 'https://musedash.moe/covers/lights_of_muse_cover.hash.1c18e1e22.png') +rpc_ + .setApplicationId('820344593357996092') + .setType('PLAYING') + .setState('pa pi pu pi pu pi pa - ころねぽち With 立秋') + .setName('Muse Dash') + .setDetails('Hard - Lvl.8') + .setAssetsLargeImage(imageSet[0].external_asset_path) + .setAssetsSmallImage(imageSet[1].external_asset_path) +client.user.setActivity(rpc_.toJSON()); +``` + + + How to get the Assets ID and Name of the bot (application) ? - Bot: