This commit is contained in:
March 7th 2022-04-17 20:42:00 +07:00
parent 485e4be048
commit 0ab2f9e729
3 changed files with 33 additions and 10 deletions

View File

@ -183,16 +183,39 @@ Update soon ~
<strong>New: You can now add custom images for RPC !</strong> <strong>New: You can now add custom images for RPC !</strong>
> Tutorial: > Tutorial:
<strong>New Method - require ver 1.1.1 - latest</strong>
```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);
```
<strong>Old Method</strong>
+ Step 1: Send photos by embed.thumbnail + Step 1: Send photos by embed.thumbnail
```js ```js
const embed = new MessageEmbed().setThumbnail('image url'); const embed = new MessageEmbed().setThumbnail('image url');
const msg = await channel.send({ embeds: [embed] }); const msg = await channel.send({ embeds: [embed] });
``` ```
+ Step 2: Get proxyURL from message.embeds[0].thumbnail.proxyURL + Step 2: Get proxyURL from message.embeds[0].thumbnail.proxyURL
```js ```js
const proxyURL = msg.embeds[0].thumbnail.proxyURL; const proxyURL = msg.embeds[0].thumbnail.proxyURL;
``` ```
+ Step 3: Put the URL in the constructor + Step 3: Put the URL in the constructor
```js ```js
const RPC = require('discord-rpc-contructor'); const RPC = require('discord-rpc-contructor');
const r = new RPC.Rpc() const r = new RPC.Rpc()

18
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "discord.js-selfbot-v13", "name": "discord.js-selfbot-v13",
"version": "1.3.7", "version": "1.3.9",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "discord.js-selfbot-v13", "name": "discord.js-selfbot-v13",
"version": "1.3.7", "version": "1.3.9",
"license": "GNU General Public License v3.0", "license": "GNU General Public License v3.0",
"dependencies": { "dependencies": {
"@discordjs/builders": "^0.12.0", "@discordjs/builders": "^0.12.0",
@ -21,7 +21,7 @@
"chalk": "^4.1.2", "chalk": "^4.1.2",
"discord-api-types": "^0.31.1", "discord-api-types": "^0.31.1",
"discord-bettermarkdown": "^1.1.0", "discord-bettermarkdown": "^1.1.0",
"discord-rpc-contructor": "^1.1.0", "discord-rpc-contructor": "^1.1.1",
"discord.js": "^13.6.0", "discord.js": "^13.6.0",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"json-bigint": "^1.0.0", "json-bigint": "^1.0.0",
@ -4470,9 +4470,9 @@
"integrity": "sha512-UbNg+sO//W3gmEUrzAZ5klDIaVP8Vwnnt0cpqK+5b38/XqGy4mFXv6sdtYZrK+uFow3R4yWzTHMFP9wFF2QHXw==" "integrity": "sha512-UbNg+sO//W3gmEUrzAZ5klDIaVP8Vwnnt0cpqK+5b38/XqGy4mFXv6sdtYZrK+uFow3R4yWzTHMFP9wFF2QHXw=="
}, },
"node_modules/discord-rpc-contructor": { "node_modules/discord-rpc-contructor": {
"version": "1.1.0", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/discord-rpc-contructor/-/discord-rpc-contructor-1.1.0.tgz", "resolved": "https://registry.npmjs.org/discord-rpc-contructor/-/discord-rpc-contructor-1.1.1.tgz",
"integrity": "sha512-QPRD2nUSDh2P5YqNvydVftC1OEVb5PC7G+98b96FzCE9UZ5tTf1zc1YK08KM9sAC5APKlukyLHYhCJ3kzVU6RA==", "integrity": "sha512-tOEY9lnVhuDSD1FXT5szmwlVyYu+D7tIwKcWz88kRsCbGDrrquxfW9y8ZTv1YcPYjNq72jNJkSQhbhntLIarpg==",
"dependencies": { "dependencies": {
"node-fetch": "^2.6.7" "node-fetch": "^2.6.7"
} }
@ -16431,9 +16431,9 @@
"integrity": "sha512-UbNg+sO//W3gmEUrzAZ5klDIaVP8Vwnnt0cpqK+5b38/XqGy4mFXv6sdtYZrK+uFow3R4yWzTHMFP9wFF2QHXw==" "integrity": "sha512-UbNg+sO//W3gmEUrzAZ5klDIaVP8Vwnnt0cpqK+5b38/XqGy4mFXv6sdtYZrK+uFow3R4yWzTHMFP9wFF2QHXw=="
}, },
"discord-rpc-contructor": { "discord-rpc-contructor": {
"version": "1.1.0", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/discord-rpc-contructor/-/discord-rpc-contructor-1.1.0.tgz", "resolved": "https://registry.npmjs.org/discord-rpc-contructor/-/discord-rpc-contructor-1.1.1.tgz",
"integrity": "sha512-QPRD2nUSDh2P5YqNvydVftC1OEVb5PC7G+98b96FzCE9UZ5tTf1zc1YK08KM9sAC5APKlukyLHYhCJ3kzVU6RA==", "integrity": "sha512-tOEY9lnVhuDSD1FXT5szmwlVyYu+D7tIwKcWz88kRsCbGDrrquxfW9y8ZTv1YcPYjNq72jNJkSQhbhntLIarpg==",
"requires": { "requires": {
"node-fetch": "^2.6.7" "node-fetch": "^2.6.7"
} }

View File

@ -57,7 +57,7 @@
"chalk": "^4.1.2", "chalk": "^4.1.2",
"discord-api-types": "^0.31.1", "discord-api-types": "^0.31.1",
"discord-bettermarkdown": "^1.1.0", "discord-bettermarkdown": "^1.1.0",
"discord-rpc-contructor": "^1.1.0", "discord-rpc-contructor": "^1.1.1",
"discord.js": "^13.6.0", "discord.js": "^13.6.0",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"json-bigint": "^1.0.0", "json-bigint": "^1.0.0",