djs-selfbot-v13 3.7.1 → 3.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,6 +23,64 @@
23
23
  </p>
24
24
  </div>
25
25
 
26
+ <details>
27
+ <summary><strong>New Features</strong></summary>
28
+
29
+ ### Guild Management
30
+ - `guild.mute(options?)` - Mute a guild completely (suppress all notifications)
31
+ - `guild.unmute()` - Unmute a guild (restore all notifications)
32
+
33
+ ### Developer Applications
34
+ - `client.developers.get(withTeamApplications?)` - Fetch all developer applications owned by the user
35
+ - `client.developers.list(withTeamApplications?)` - Alias for get() method
36
+ - `client.developers.fetch(applicationId)` - Fetch a specific application by ID
37
+ - `client.developers.edit(applicationId, data)` - Edit an application with custom data
38
+ - `client.developers.setAvatar(applicationId, avatar)` - Set application avatar/icon
39
+ - `client.developers.setName(applicationId, name)` - Set application name
40
+ - `client.developers.setDescription(applicationId, description)` - Set application description
41
+ - `client.developers.setTags(applicationId, tags)` - Set application tags (max 5)
42
+ - `client.developers.addTag(applicationId, tag)` - Add a single tag to application
43
+ - `client.developers.delTag(applicationId, tag)` - Remove a tag from application
44
+ - `client.developers.enableIntents(applicationId)` - Enable bot intents for application
45
+ - `client.developers.disableIntents(applicationId)` - Disable bot intents for application
46
+
47
+ **Application Object Methods (Direct Usage):**
48
+ - `application.edit(data)` - Edit the application
49
+ - `application.setAvatar(avatar)` - Set application avatar/icon
50
+ - `application.setName(name)` - Set application name
51
+ - `application.setDescription(description)` - Set application description
52
+ - `application.setTags(tags)` - Set application tags (max 5)
53
+ - `application.addTag(tag)` - Add a single tag
54
+ - `application.delTag(tag)` - Remove a tag
55
+ - `application.enableIntents()` - Enable bot intents
56
+ - `application.disableIntents()` - Disable bot intents
57
+
58
+ ### RPC Enhancements
59
+ - `rpc.setDetailsURL(url)` - Set a URL for RPC details
60
+ - `rpc.setStateURL(url)` - Set a URL for RPC state
61
+
62
+ ### User Profile Customization
63
+ - `client.user.setNameStyle(fontName, effectName, color1, color2?)` - Set display name style with font, effect and colors
64
+ - `client.user.setClan(GuildID)` - Change your server clan tag
65
+ - `client.user.deleteClan()` - Remove server clan tag
66
+
67
+ ### Profile Widgets
68
+ - `client.user.addWidget(type, gameId, comment?, tags?)` - Add a game widget to profile
69
+ - `client.user.delWidget(type, gameId?)` - Remove a widget or specific game
70
+ - `client.user.widgetsList()` - Get list of all widgets
71
+
72
+ ### Quest System
73
+ - `client.quests.get()` - Fetch all available quests
74
+ - `client.quests.orbs()` - Get virtual currency balance
75
+ - `client.quests.acceptQuest(questId, options?)` - Accept a quest
76
+ - `client.quests.doingQuest(quest)` - Auto-complete a quest
77
+ - `client.quests.autoCompleteAll()` - Auto-complete all valid quests
78
+ - `client.quests.getCompleted()` - Get completed quests
79
+ - `client.quests.getClaimable()` - Get claimable quests
80
+ - `client.quests.filterQuestsValid()` - Filter valid quests
81
+
82
+ </details>
83
+
26
84
  > [!WARNING]
27
85
  > **I don't take any responsibility for blocked Discord accounts that used this module.**
28
86
 
@@ -49,13 +107,13 @@
49
107
  > **Node.js 20.18.0 or newer is required**
50
108
 
51
109
  ```sh-session
52
- npm install discord.js-selfbot-v13-next@latest
110
+ npm install djs-selfbot-v13@latest
53
111
  ```
54
112
 
55
113
  ## Example
56
114
 
57
115
  ```js
58
- const { Client } = require('discord.js-selfbot-v13-next');
116
+ const { Client } = require('djs-selfbot-v13');
59
117
  const client = new Client();
60
118
 
61
119
  client.on('ready', async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "djs-selfbot-v13",
3
- "version": "3.7.1",
3
+ "version": "3.7.3",
4
4
  "description": "An unofficial discord.js fork for creating selfbots",
5
5
  "main": "./src/index.js",
6
6
  "types": "./typings/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "git+https://github.com/aiko-chan-ai/discord.js-selfbot-v13.git"
32
+ "url": "git+https://github.com/aiko-chan-ai/djs-selfbot-v13.git"
33
33
  },
34
34
  "keywords": [
35
35
  "discord.js",
@@ -47,9 +47,9 @@
47
47
  "author": "aiko-chan-ai",
48
48
  "license": "GNU General Public License v3.0",
49
49
  "bugs": {
50
- "url": "https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues"
50
+ "url": "https://github.com/aiko-chan-ai/djs-selfbot-v13/issues"
51
51
  },
52
- "homepage": "https://github.com/aiko-chan-ai/discord.js-selfbot-v13#readme",
52
+ "homepage": "https://github.com/aiko-chan-ai/djs-selfbot-v13#readme",
53
53
  "dependencies": {
54
54
  "@discordjs/builders": "^1.6.3",
55
55
  "@discordjs/collection": "^2.1.1",
@@ -15,8 +15,10 @@ const BaseGuildEmojiManager = require('../managers/BaseGuildEmojiManager');
15
15
  const BillingManager = require('../managers/BillingManager');
16
16
  const ChannelManager = require('../managers/ChannelManager');
17
17
  const ClientUserSettingManager = require('../managers/ClientUserSettingManager');
18
+ const DeveloperManager = require('../managers/DeveloperManager');
18
19
  const GuildManager = require('../managers/GuildManager');
19
20
  const PresenceManager = require('../managers/PresenceManager');
21
+ const QuestManager = require('../managers/QuestManager');
20
22
  const RelationshipManager = require('../managers/RelationshipManager');
21
23
  const SessionManager = require('../managers/SessionManager');
22
24
  const UserManager = require('../managers/UserManager');
@@ -158,6 +160,18 @@ class Client extends BaseClient {
158
160
  */
159
161
  this.billing = new BillingManager(this);
160
162
 
163
+ /**
164
+ * Manages developer applications
165
+ * @type {DeveloperManager}
166
+ */
167
+ this.developers = new DeveloperManager(this);
168
+
169
+ /**
170
+ * Manages quest-related API methods
171
+ * @type {QuestManager}
172
+ */
173
+ this.quests = new QuestManager(this);
174
+
161
175
  /**
162
176
  * All of the sessions of the client
163
177
  * @type {SessionManager}
@@ -19,7 +19,7 @@ class GuildMemberRemoveAction extends Action {
19
19
  * Emitted whenever a member leaves a guild, or is kicked.
20
20
  * @event Client#guildMemberRemove
21
21
  * @param {GuildMember} member The member that has left/been kicked from the guild
22
- * @deprecated See {@link https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues/197 this issue} for more information.
22
+ * @deprecated See {@link https://github.com/aiko-chan-ai/djs-selfbot-v13/issues/197 this issue} for more information.
23
23
  */
24
24
  if (shard.status === Status.READY) client.emit(Events.GUILD_MEMBER_REMOVE, member);
25
25
  }
@@ -25,7 +25,7 @@ class GuildMemberUpdateAction extends Action {
25
25
  * @event Client#guildMemberUpdate
26
26
  * @param {GuildMember} oldMember The member before the update
27
27
  * @param {GuildMember} newMember The member after the update
28
- * @deprecated See {@link https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues/197 this issue} for more information.
28
+ * @deprecated See {@link https://github.com/aiko-chan-ai/djs-selfbot-v13/issues/197 this issue} for more information.
29
29
  */
30
30
  if (shard.status === Status.READY && !member.equals(old)) client.emit(Events.GUILD_MEMBER_UPDATE, old, member);
31
31
  } else {
@@ -12,7 +12,7 @@ module.exports = (client, { d: data }, shard) => {
12
12
  * Emitted whenever a user joins a guild.
13
13
  * @event Client#guildMemberAdd
14
14
  * @param {GuildMember} member The member that has joined a guild
15
- * @deprecated See {@link https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues/197 this issue} for more information.
15
+ * @deprecated See {@link https://github.com/aiko-chan-ai/djs-selfbot-v13/issues/197 this issue} for more information.
16
16
  */
17
17
  client.emit(Events.GUILD_MEMBER_ADD, member);
18
18
  }
@@ -30,7 +30,7 @@ class BillingManager extends BaseManager {
30
30
 
31
31
  /**
32
32
  * Fetches all the payment sources of the client
33
- * @returns {Collection<Snowflake, Object>}
33
+ * @returns {Promise<Collection<Snowflake, Object>>}
34
34
  */
35
35
  async fetchPaymentSources() {
36
36
  // https://discord.com/api/v9/users/@me/billing/payment-sources
@@ -42,7 +42,7 @@ class BillingManager extends BaseManager {
42
42
 
43
43
  /**
44
44
  * Fetches all the guild boosts of the client
45
- * @returns {Collection<Snowflake, GuildBoost>}
45
+ * @returns {Promise<Collection<Snowflake, GuildBoost>>}
46
46
  */
47
47
  async fetchGuildBoosts() {
48
48
  // https://discord.com/api/v9/users/@me/guilds/premium/subscription-slots
@@ -53,7 +53,7 @@ class BillingManager extends BaseManager {
53
53
 
54
54
  /**
55
55
  * Fetches the current subscription of the client
56
- * @returns {Collection<Snowflake, Object>}
56
+ * @returns {Promise<Collection<Snowflake, Object>>}
57
57
  */
58
58
  async fetchCurrentSubscription() {
59
59
  // https://discord.com/api/v9/users/@me/billing/subscriptions
@@ -0,0 +1,253 @@
1
+ 'use strict';
2
+
3
+ const { Collection } = require('@discordjs/collection');
4
+ const BaseManager = require('./BaseManager');
5
+ const Application = require('../structures/interfaces/Application');
6
+ const DataResolver = require('../util/DataResolver');
7
+
8
+ /**
9
+ * Manages API methods for developer applications and provides utilities you might need.
10
+ * @extends {BaseManager}
11
+ */
12
+ class DeveloperManager extends BaseManager {
13
+ constructor(client) {
14
+ super(client);
15
+ }
16
+
17
+ /**
18
+ * Fetches all applications owned by the current user
19
+ * @param {boolean} [withTeamApplications=true] Whether to include team applications
20
+ * @returns {Promise<Collection<Snowflake, Application>>}
21
+ * @example
22
+ * // Fetch all developer applications
23
+ * client.developers.get()
24
+ * .then(applications => console.log(`Found ${applications.size} applications`))
25
+ * .catch(console.error);
26
+ */
27
+ async get(withTeamApplications = true) {
28
+ const data = await this.client.api.applications.get({
29
+ query: {
30
+ with_team_applications: withTeamApplications,
31
+ },
32
+ });
33
+
34
+ const applications = new Collection();
35
+ for (const app of data) {
36
+ applications.set(app.id, new Application(this.client, app));
37
+ }
38
+
39
+ return applications;
40
+ }
41
+
42
+ /**
43
+ * Alias for get() method
44
+ * @param {boolean} [withTeamApplications=true] Whether to include team applications
45
+ * @returns {Promise<Collection<Snowflake, Application>>}
46
+ */
47
+ list(withTeamApplications = true) {
48
+ return this.get(withTeamApplications);
49
+ }
50
+
51
+ /**
52
+ * Fetches a specific application by ID
53
+ * @param {Snowflake} applicationId The ID of the application to fetch
54
+ * @returns {Promise<Application>}
55
+ * @example
56
+ * // Fetch a specific application
57
+ * client.developers.fetch('1234567890123456789')
58
+ * .then(app => console.log(`Application: ${app.name}`))
59
+ * .catch(console.error);
60
+ */
61
+ async fetch(applicationId) {
62
+ const data = await this.client.api.applications(applicationId).get();
63
+ return new Application(this.client, data);
64
+ }
65
+
66
+ /**
67
+ * Edits an application
68
+ * @param {Snowflake} applicationId The ID of the application to edit
69
+ * @param {ApplicationEditData} data The data to edit the application with
70
+ * @returns {Promise<Application>}
71
+ * @example
72
+ * // Edit an application
73
+ * client.developers.edit('1234567890123456789', {
74
+ * name: 'My New Bot Name',
75
+ * description: 'A cool bot description',
76
+ * tags: ['utility', 'moderation']
77
+ * })
78
+ * .then(app => console.log(`Updated: ${app.name}`))
79
+ * .catch(console.error);
80
+ */
81
+ async edit(applicationId, data) {
82
+ const _data = {};
83
+
84
+ if (data.name) _data.name = data.name;
85
+ if (data.description !== undefined) _data.description = data.description;
86
+ if (data.icon !== undefined) _data.icon = await DataResolver.resolveImage(data.icon);
87
+ if (data.tags) _data.tags = data.tags;
88
+ if (data.interactionsEndpointUrl !== undefined) _data.interactions_endpoint_url = data.interactionsEndpointUrl;
89
+ if (data.roleConnectionsVerificationUrl !== undefined) _data.role_connections_verification_url = data.roleConnectionsVerificationUrl;
90
+ if (data.termsOfServiceUrl !== undefined) _data.terms_of_service_url = data.termsOfServiceUrl;
91
+ if (data.privacyPolicyUrl !== undefined) _data.privacy_policy_url = data.privacyPolicyUrl;
92
+
93
+ const result = await this.client.api.applications(applicationId).patch({ data: _data });
94
+ return new Application(this.client, result);
95
+ }
96
+
97
+ /**
98
+ * Sets the avatar of an application
99
+ * @param {Snowflake} applicationId The ID of the application
100
+ * @param {?(BufferResolvable|Base64Resolvable)} avatar The new avatar
101
+ * @returns {Promise<Application>}
102
+ * @example
103
+ * // Set application avatar
104
+ * client.developers.setAvatar('1234567890123456789', './avatar.png')
105
+ * .then(app => console.log(`Updated avatar for ${app.name}`))
106
+ * .catch(console.error);
107
+ */
108
+ setAvatar(applicationId, avatar) {
109
+ return this.edit(applicationId, { icon: avatar });
110
+ }
111
+
112
+ /**
113
+ * Sets the name of an application
114
+ * @param {Snowflake} applicationId The ID of the application
115
+ * @param {string} name The new name
116
+ * @returns {Promise<Application>}
117
+ * @example
118
+ * // Set application name
119
+ * client.developers.setName('1234567890123456789', 'My Cool Bot')
120
+ * .then(app => console.log(`Renamed to ${app.name}`))
121
+ * .catch(console.error);
122
+ */
123
+ setName(applicationId, name) {
124
+ return this.edit(applicationId, { name });
125
+ }
126
+
127
+ /**
128
+ * Sets the description of an application
129
+ * @param {Snowflake} applicationId The ID of the application
130
+ * @param {string} description The new description
131
+ * @returns {Promise<Application>}
132
+ * @example
133
+ * // Set application description
134
+ * client.developers.setDescription('1234567890123456789', 'A helpful utility bot')
135
+ * .then(app => console.log(`Updated description for ${app.name}`))
136
+ * .catch(console.error);
137
+ */
138
+ setDescription(applicationId, description) {
139
+ return this.edit(applicationId, { description });
140
+ }
141
+
142
+ /**
143
+ * Sets the tags of an application (max 5 tags)
144
+ * @param {Snowflake} applicationId The ID of the application
145
+ * @param {string[]} tags Array of tags (max 5)
146
+ * @returns {Promise<Application>}
147
+ * @example
148
+ * // Set application tags
149
+ * client.developers.setTags('1234567890123456789', ['utility', 'moderation', 'fun'])
150
+ * .then(app => console.log(`Updated tags for ${app.name}`))
151
+ * .catch(console.error);
152
+ */
153
+ setTags(applicationId, tags) {
154
+ if (tags.length > 5) {
155
+ throw new Error('Maximum of 5 tags allowed');
156
+ }
157
+ return this.edit(applicationId, { tags });
158
+ }
159
+
160
+ /**
161
+ * Adds a tag to an application
162
+ * @param {Snowflake} applicationId The ID of the application
163
+ * @param {string} tag The tag to add
164
+ * @returns {Promise<Application>}
165
+ * @example
166
+ * // Add a tag to application
167
+ * client.developers.addTag('1234567890123456789', 'music')
168
+ * .then(app => console.log(`Added tag to ${app.name}`))
169
+ * .catch(console.error);
170
+ */
171
+ async addTag(applicationId, tag) {
172
+ const app = await this.fetch(applicationId);
173
+ const currentTags = app.tags || [];
174
+
175
+ if (currentTags.includes(tag)) {
176
+ throw new Error('Tag already exists');
177
+ }
178
+
179
+ if (currentTags.length >= 5) {
180
+ throw new Error('Maximum of 5 tags allowed');
181
+ }
182
+
183
+ const newTags = [...currentTags, tag];
184
+ return this.edit(applicationId, { tags: newTags });
185
+ }
186
+
187
+ /**
188
+ * Removes a tag from an application
189
+ * @param {Snowflake} applicationId The ID of the application
190
+ * @param {string} tag The tag to remove
191
+ * @returns {Promise<Application>}
192
+ * @example
193
+ * // Remove a tag from application
194
+ * client.developers.delTag('1234567890123456789', 'music')
195
+ * .then(app => console.log(`Removed tag from ${app.name}`))
196
+ * .catch(console.error);
197
+ */
198
+ async delTag(applicationId, tag) {
199
+ const app = await this.fetch(applicationId);
200
+ const currentTags = app.tags || [];
201
+
202
+ if (!currentTags.includes(tag)) {
203
+ throw new Error('Tag does not exist');
204
+ }
205
+
206
+ const newTags = currentTags.filter(t => t !== tag);
207
+ return this.edit(applicationId, { tags: newTags });
208
+ }
209
+
210
+ /**
211
+ * Enables intents for a bot application
212
+ * @param {Snowflake} applicationId The ID of the application
213
+ * @returns {Promise<Application>}
214
+ * @example
215
+ * // Enable intents for bot
216
+ * client.developers.enableIntents('1234567890123456789')
217
+ * .then(app => console.log(`Enabled intents for ${app.name}`))
218
+ * .catch(console.error);
219
+ */
220
+ async enableIntents(applicationId) {
221
+ const data = await this.client.api.applications(applicationId).patch({
222
+ data: {
223
+ bot_public: true,
224
+ bot_require_code_grant: false,
225
+ flags: 25731072, // Flags with intents enabled
226
+ },
227
+ });
228
+ return new Application(this.client, data);
229
+ }
230
+
231
+ /**
232
+ * Disables intents for a bot application
233
+ * @param {Snowflake} applicationId The ID of the application
234
+ * @returns {Promise<Application>}
235
+ * @example
236
+ * // Disable intents for bot
237
+ * client.developers.disableIntents('1234567890123456789')
238
+ * .then(app => console.log(`Disabled intents for ${app.name}`))
239
+ * .catch(console.error);
240
+ */
241
+ async disableIntents(applicationId) {
242
+ const data = await this.client.api.applications(applicationId).patch({
243
+ data: {
244
+ bot_public: true,
245
+ bot_require_code_grant: false,
246
+ flags: 25165824, // Flags with intents disabled
247
+ },
248
+ });
249
+ return new Application(this.client, data);
250
+ }
251
+ }
252
+
253
+ module.exports = DeveloperManager;