diff --git a/DOCUMENT.md b/DOCUMENT.md index db4facd..88084ba 100644 --- a/DOCUMENT.md +++ b/DOCUMENT.md @@ -146,7 +146,26 @@ Guild
Click to show -- Document come soon ! +Custom Status + +```js +const { RichPresence } = require('discord.js-selfbot-v13'); +const custom = new RichPresence.CustomStatus() + .setUnicodeEmoji('🎮') // Set Unicode Emoji [Using one] + .setDiscordEmoji({ // Set Custom Emoji (Nitro) [Using one] + name: 'nom', + id: '737373737373737373', + animated: false, + }) + .setState('Testing') // Name of presence + .toDiscord(); +client.user.setActivity(custom); +``` + +Rich Presence +```js +Come back soon ! +```
## More features diff --git a/package.json b/package.json index 059719a..2661e90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord.js-selfbot-v13", - "version": "0.1.8", + "version": "0.1.9", "description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]", "main": "./src/index.js", "types": "./typings/index.d.ts", diff --git a/RPC/index.d.ts b/src/RPC/index.d.ts similarity index 100% rename from RPC/index.d.ts rename to src/RPC/index.d.ts diff --git a/RPC/index.js b/src/RPC/index.js similarity index 99% rename from RPC/index.js rename to src/RPC/index.js index a0bdf58..8b95bca 100644 --- a/RPC/index.js +++ b/src/RPC/index.js @@ -520,7 +520,7 @@ module.exports = (function (e) { name: 'Custom Status', emoji: null, type: 4, - state: '??', + state: null, }), e && (this.game = e); } @@ -1843,7 +1843,7 @@ module.exports = (function (e) { }); }, function (e, t) { - e.exports = require("../package.json"); + e.exports = require("../../../package.json"); }, ]); \ No newline at end of file diff --git a/src/client/websocket/handlers/READY.js b/src/client/websocket/handlers/READY.js index de2960e..ebc38c3 100644 --- a/src/client/websocket/handlers/READY.js +++ b/src/client/websocket/handlers/READY.js @@ -59,6 +59,7 @@ module.exports = (client, { d: data }, shard) => { } else { custom_status.setUnicodeEmoji(res.rawSetting.custom_status.emoji_name); } + custom_status.setState(res.rawSetting.custom_status?.text); } client.user.setPresence({ activities: custom_status ? [custom_status.toDiscord()] : [], diff --git a/src/index.js b/src/index.js index 396bdcc..7951887 100644 --- a/src/index.js +++ b/src/index.js @@ -9,7 +9,7 @@ exports.ShardingManager = require('./sharding/ShardingManager'); exports.WebhookClient = require('./client/WebhookClient'); // Utilities -exports.RichPresence = require('../RPC/index'); +exports.RichPresence = require('./RPC/index'); exports.ActivityFlagsBitField = require('./util/ActivityFlagsBitField'); exports.ApplicationFlagsBitField = require('./util/ApplicationFlagsBitField'); exports.BaseManager = require('./managers/BaseManager'); diff --git a/src/structures/ClientPresence.js b/src/structures/ClientPresence.js index 8b94107..c4dc743 100644 --- a/src/structures/ClientPresence.js +++ b/src/structures/ClientPresence.js @@ -21,7 +21,6 @@ class ClientPresence extends Presence { set(presence) { const packet = this._parse(presence); this._patch(packet); - console.log(packet); if (typeof presence.shardId === 'undefined') { this.client.ws.broadcast({ op: GatewayOpcodes.PresenceUpdate, d: packet }); } else if (Array.isArray(presence.shardId)) {