fix(Module): Remove module

discord-rpc-contructor
This commit is contained in:
March 7th 2022-07-07 02:08:00 +07:00
parent 5246129553
commit a8a9528a28
5 changed files with 18 additions and 26 deletions

View File

@ -142,19 +142,14 @@ User {
Custom Status Custom Status
```js ```js
const RichPresence = require('discord-rpc-contructor'); // My module :)) const r = new Discord.CustomStatus()
const custom = new RichPresence.CustomStatus() .setState('Discord')
.setUnicodeEmoji('🎮') // Set Unicode Emoji [Using one] .setEmoji('💬')
.setDiscordEmoji({ // Set Custom Emoji (Nitro Classic / Boost) [Using one] client.user.setActivity(r.toJSON());
name: 'nom',
id: '737373737373737373',
animated: false,
})
.setState('Testing') // Name of presence
.toDiscord();
client.user.setActivity(custom);
``` ```
<img src='https://cdn.discordapp.com/attachments/820557032016969751/994318117243203758/unknown.png'>
Rich Presence [Custom] Rich Presence [Custom]
```js ```js
const r = new Discord.RichPresence() const r = new Discord.RichPresence()

File diff suppressed because one or more lines are too long

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "discord.js-selfbot-v13", "name": "discord.js-selfbot-v13",
"version": "2.3.63", "version": "2.3.64",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "discord.js-selfbot-v13", "name": "discord.js-selfbot-v13",
"version": "2.3.63", "version": "2.3.64",
"license": "GNU General Public License v3.0", "license": "GNU General Public License v3.0",
"dependencies": { "dependencies": {
"@aikochan2k6/qrcode-terminal": "^0.12.0", "@aikochan2k6/qrcode-terminal": "^0.12.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "discord.js-selfbot-v13", "name": "discord.js-selfbot-v13",
"version": "2.3.63", "version": "2.3.64",
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]", "description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
"main": "./src/index.js", "main": "./src/index.js",
"types": "./typings/index.d.ts", "types": "./typings/index.d.ts",

View File

@ -4,7 +4,6 @@ const process = require('node:process');
const { setInterval, setTimeout } = require('node:timers'); const { setInterval, setTimeout } = require('node:timers');
const { Collection } = require('@discordjs/collection'); const { Collection } = require('@discordjs/collection');
const { getVoiceConnection } = require('@discordjs/voice'); const { getVoiceConnection } = require('@discordjs/voice');
const RichPresence = require('discord-rpc-contructor');
const BaseClient = require('./BaseClient'); const BaseClient = require('./BaseClient');
const ActionsManager = require('./actions/ActionsManager'); const ActionsManager = require('./actions/ActionsManager');
const ClientVoiceManager = require('./voice/ClientVoiceManager'); const ClientVoiceManager = require('./voice/ClientVoiceManager');
@ -22,6 +21,7 @@ const ClientPresence = require('../structures/ClientPresence');
const GuildPreview = require('../structures/GuildPreview'); const GuildPreview = require('../structures/GuildPreview');
const GuildTemplate = require('../structures/GuildTemplate'); const GuildTemplate = require('../structures/GuildTemplate');
const Invite = require('../structures/Invite'); const Invite = require('../structures/Invite');
const { CustomStatus } = require('../structures/RichPresence');
const { Sticker } = require('../structures/Sticker'); const { Sticker } = require('../structures/Sticker');
const StickerPack = require('../structures/StickerPack'); const StickerPack = require('../structures/StickerPack');
const VoiceRegion = require('../structures/VoiceRegion'); const VoiceRegion = require('../structures/VoiceRegion');
@ -669,21 +669,18 @@ class Client extends BaseClient {
return eval(script); return eval(script);
} }
async customStatusAuto(client) { customStatusAuto(client) {
client = client ?? this; client = client ?? this;
let custom_status; const custom_status = new CustomStatus();
if (client.setting.rawSetting.custom_status?.text || client.setting.rawSetting.custom_status?.emoji_name) { if (client.setting.rawSetting.custom_status?.text || client.setting.rawSetting.custom_status?.emoji_name) {
custom_status = new RichPresence.CustomStatus(); custom_status.setEmoji({
if (client.setting.rawSetting.custom_status.emoji_id) { name: client.setting.rawSetting.custom_status?.emoji_name,
const emoji = await client.emojis.resolve(client.setting.rawSetting.custom_status.emoji_id); id: client.setting.rawSetting.custom_status?.emoji_id,
if (emoji) custom_status.setDiscordEmoji(emoji); });
} else {
custom_status.setUnicodeEmoji(client.setting.rawSetting.custom_status.emoji_name);
}
custom_status.setState(client.setting.rawSetting.custom_status?.text); custom_status.setState(client.setting.rawSetting.custom_status?.text);
client.user.setPresence({ client.user.setPresence({
activities: custom_status activities: custom_status
? [custom_status.toDiscord(), ...this.presence.activities.filter(a => a.type !== 'CUSTOM')] ? [custom_status.toJSON(), ...this.presence.activities.filter(a => a.type !== 'CUSTOM')]
: this.presence.activities.filter(a => a.type !== 'CUSTOM'), : this.presence.activities.filter(a => a.type !== 'CUSTOM'),
status: client.setting.rawSetting.status, status: client.setting.rawSetting.status,
}); });