From 7f17c21305ec53ccc007e9aca33d10ef5f555553 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 6 May 2022 19:44:23 +0700 Subject: [PATCH] Update User.md --- Document/User.md | 49 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/Document/User.md b/Document/User.md index 7fec8a7..6df0121 100644 --- a/Document/User.md +++ b/Document/User.md @@ -185,32 +185,8 @@ Update soon ~ New: You can now add custom images for RPC ! > Tutorial: - -New Method - require ver 1.1.1 - latest - -``` -Note: If you use time-varying RPC, or if it takes too long to place images, use the 2nd method because it spams me too much .-. -``` - -![image](https://user-images.githubusercontent.com/71698422/164040950-9679cec3-b47e-4521-b5f6-ee83a79a1978.png) - -```js -const RPC = require('discord-rpc-contructor'); -const r = new RPC.Rpc() - .setApplicationId('817229550684471297') - .setType(0) - .setState('State') - .setName('Name') - .setDetails('Details') - .setAssetsLargeImage(await RPC.getImageCustom(imageURL1)) // Custom image - .setAssetsLargeText('Youtube') - .setAssetsSmallImage(await RPC.getImageCustom(imageURL2)) // Custom image - .setAssetsSmallText('Bot') -client.user.setActivity(r.toDiscord().game); -``` - -Old Method +Method 1 + Step 1: Send photos by embed.thumbnail @@ -240,6 +216,29 @@ const r = new RPC.Rpc() client.user.setActivity(r.toDiscord().game); ``` +Method 2 - require ver 1.1.1 - latest + +``` +Note: If you use time-varying RPC, or if it takes too long to place images, use the 2nd method because it spams me too much .-. +``` + +![image](https://user-images.githubusercontent.com/71698422/164040950-9679cec3-b47e-4521-b5f6-ee83a79a1978.png) + + +```js +const RPC = require('discord-rpc-contructor'); +const r = new RPC.Rpc() + .setApplicationId('817229550684471297') + .setType(0) + .setState('State') + .setName('Name') + .setDetails('Details') + .setAssetsLargeImage(await RPC.getImageCustom(imageURL1)) // Custom image + .setAssetsLargeText('Youtube') + .setAssetsSmallImage(await RPC.getImageCustom(imageURL2)) // Custom image + .setAssetsSmallText('Bot') +client.user.setActivity(r.toDiscord().game); +``` How to get AssetID ?