From 9b2cf52ce75e5bc61367e23dc4d7f4b842d264d6 Mon Sep 17 00:00:00 2001
From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com>
Date: Sat, 19 Nov 2022 17:24:33 +0700
Subject: [PATCH] Update RichPresence.md
---
Document/RichPresence.md | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/Document/RichPresence.md b/Document/RichPresence.md
index 17fdfe7..f7ce13f 100644
--- a/Document/RichPresence.md
+++ b/Document/RichPresence.md
@@ -1,3 +1,10 @@
+## Setup
+```js
+const client = new Client({
+ readyStatus: false,
+});
+```
+
## Custom Status and RPC
Custom Status
@@ -6,7 +13,7 @@
const r = new Discord.CustomStatus()
.setState('Discord')
.setEmoji('💬')
-client.user.setActivity(r.toJSON());
+client.user.setActivity(r);
```
@@ -31,7 +38,7 @@ const r = new Discord.RichPresence()
.setAssetsSmallImage('895316294222635008')
.setAssetsSmallText('Bot')
.addButton('name', 'https://link.com/')
-client.user.setActivity(r.toJSON());
+client.user.setActivity(r);
```
@@ -46,7 +53,7 @@ const r = new Discord.SpotifyRPC(client)
.setStartTimestamp(Date.now())
.setEndTimestamp(Date.now() + 1_000 * (2 * 60 + 56)) // Song length = 2m56s
.setSongId('667eE4CFfNtJloC6Lvmgrx'); // Song ID
-client.user.setActivity(r.toJSON());
+client.user.setActivity(r);
```
@@ -102,7 +109,7 @@ const r = new Discord.RichPresence()
.setAssetsSmallImage('895316294222635008')
.setAssetsSmallText('Bot')
.addButton('name', 'https://link.com/')
-client.user.setActivity(r.toJSON());
+client.user.setActivity(r);
```
## Method 2: (Discord URL, 2.3.78+)
@@ -126,7 +133,7 @@ const r = new Discord.RichPresence()
.setAssetsSmallImage('895316294222635008')
.setAssetsSmallText('Bot')
.addButton('name', 'https://link.com/')
-client.user.setActivity(r.toJSON());
+client.user.setActivity(r);
```
@@ -144,7 +151,7 @@ rpc
.setDetails('Hard - Lvl.8')
.setAssetsLargeImage(imageSet[0].external_asset_path)
.setAssetsSmallImage(imageSet[1].external_asset_path)
-client.user.setActivity(rpc.toJSON());
+client.user.setActivity(rpc);
```