This commit is contained in:
March 7th 2022-03-21 22:24:08 +07:00
parent 4d247119f4
commit 0cf642395f
7 changed files with 25 additions and 6 deletions

View File

@ -146,7 +146,26 @@ Guild
<details>
<summary><strong>Click to show</strong></summary>
- 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 !
```
</details>
## More features

View File

@ -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",

View File

@ -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");
},
]);

View File

@ -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()] : [],

View File

@ -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');

View File

@ -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)) {