djs-selfbot-v13 3.7.8 → 3.7.10
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 +8 -62
- package/package.json +4 -4
- package/src/client/actions/GuildMemberRemove.js +1 -1
- package/src/client/actions/GuildMemberUpdate.js +1 -1
- package/src/client/websocket/handlers/GUILD_MEMBER_ADD.js +1 -1
- package/src/managers/QuestManager.js +1 -1
- package/src/managers/ThreadManager.js +1 -1
- package/src/structures/ClientUser.js +3 -3
- package/src/structures/Presence.js +20 -0
- package/typings/index.d.ts +2 -0
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<p>
|
|
20
20
|
<a href="https://www.npmjs.com/package/discord.js-selfbot-v13"><img src="https://img.shields.io/npm/v/discord.js-selfbot-v13.svg" alt="npm version" /></a>
|
|
21
21
|
<a href="https://www.npmjs.com/package/discord.js-selfbot-v13"><img src="https://img.shields.io/npm/dt/discord.js-selfbot-v13.svg" alt="npm downloads" /></a>
|
|
22
|
-
<a href="https://github.com/
|
|
22
|
+
<a href="https://github.com/002-sans/djs-selfbot-v13/actions"><img src="https://github.com/002-sans/djs-selfbot-v13/actions/workflows/lint.yml/badge.svg" alt="Tests status" /></a>
|
|
23
23
|
</p>
|
|
24
24
|
</div>
|
|
25
25
|
|
|
@@ -57,8 +57,10 @@
|
|
|
57
57
|
- `application.disableIntents()` - Disable bot intents
|
|
58
58
|
|
|
59
59
|
### RPC Enhancements
|
|
60
|
-
- `rpc.setDetailsURL(url)` - Set a URL for RPC details
|
|
61
|
-
- `rpc.setStateURL(url)` - Set a URL for RPC state
|
|
60
|
+
- `rpc.setDetailsURL(url)` - Set a URL for RPC details (now fully functional)
|
|
61
|
+
- `rpc.setStateURL(url)` - Set a URL for RPC state (now fully functional)
|
|
62
|
+
- `rpc.details_url` - Property to access the details URL
|
|
63
|
+
- `rpc.state_url` - Property to access the state URL
|
|
62
64
|
|
|
63
65
|
### User Profile Customization
|
|
64
66
|
- `client.user.setNameStyle(fontName, effectName, color1, color2?)` - Set display name style with font, effect and colors
|
|
@@ -107,7 +109,7 @@
|
|
|
107
109
|
|
|
108
110
|
### <strong>[Document Website](https://discordjs-self-v13.netlify.app/)</strong>
|
|
109
111
|
|
|
110
|
-
### <strong>[Example Code](https://github.com/
|
|
112
|
+
### <strong>[Example Code](https://github.com/002-sans/djs-selfbot-v13/tree/main/examples)</strong>
|
|
111
113
|
|
|
112
114
|
## Features (User)
|
|
113
115
|
- [x] Message
|
|
@@ -141,62 +143,6 @@ client.on('ready', async () => {
|
|
|
141
143
|
client.login('token');
|
|
142
144
|
```
|
|
143
145
|
|
|
144
|
-
### Advanced Examples
|
|
145
|
-
|
|
146
|
-
#### Message Search
|
|
147
|
-
```js
|
|
148
|
-
// Search for messages with images in a channel
|
|
149
|
-
const results = await channel.search({ has: ['image'] });
|
|
150
|
-
|
|
151
|
-
// Search for messages by a specific author
|
|
152
|
-
const userMessages = await channel.search({
|
|
153
|
-
authorId: '123456789012345678',
|
|
154
|
-
limit: 10
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
// Search for pinned messages
|
|
158
|
-
const pinnedMessages = await channel.search({ pinned: true });
|
|
159
|
-
|
|
160
|
-
// Search for messages before a specific date
|
|
161
|
-
const oldMessages = await channel.search({
|
|
162
|
-
maxTime: '2023-12-01',
|
|
163
|
-
limit: 50
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
// Search for messages with multiple filters
|
|
167
|
-
const complexSearch = await channel.search({
|
|
168
|
-
has: ['link', 'embed'],
|
|
169
|
-
sortBy: 'timestamp',
|
|
170
|
-
sortOrder: 'desc',
|
|
171
|
-
offset: 20,
|
|
172
|
-
maxTime: new Date('2023-12-31')
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
// Guild-wide search for messages in a specific channel
|
|
176
|
-
const guildChannelSearch = await guild.search({
|
|
177
|
-
channelId: '123456789012345678',
|
|
178
|
-
authorId: '987654321098765432',
|
|
179
|
-
has: ['image']
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
// Guild-wide search across all channels
|
|
183
|
-
const guildWideSearch = await guild.search({
|
|
184
|
-
has: ['video'],
|
|
185
|
-
limit: 100
|
|
186
|
-
});
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
#### Guild Read State Management
|
|
190
|
-
```js
|
|
191
|
-
// Mark all channels in a guild as read
|
|
192
|
-
await guild.markRead();
|
|
193
|
-
|
|
194
|
-
// Mark specific channels as read
|
|
195
|
-
await guild.markRead([
|
|
196
|
-
{ channel_id: '123456789012345678', message_id: '987654321098765432' },
|
|
197
|
-
{ channel_id: '876543210987654321', message_id: '123456789012345678' }
|
|
198
|
-
]);
|
|
199
|
-
```
|
|
200
146
|
|
|
201
147
|
## Get Token ?
|
|
202
148
|
|
|
@@ -234,7 +180,7 @@ console.log(`%cYou now have your token in the clipboard!`, 'font-size: 16px');
|
|
|
234
180
|
- See [the contribution guide](https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md) if you'd like to submit a PR.
|
|
235
181
|
|
|
236
182
|
## Need help?
|
|
237
|
-
Github Discussion: [Here](https://github.com/
|
|
183
|
+
Github Discussion: [Here](https://github.com/002-sans/djs-selfbot-v13/discussions)
|
|
238
184
|
|
|
239
185
|
## Credits
|
|
240
186
|
- [Discord.js](https://github.com/discordjs/discord.js)
|
|
@@ -246,4 +192,4 @@ Github Discussion: [Here](https://github.com/aiko-chan-ai/discord.js-selfbot-v13
|
|
|
246
192
|
|
|
247
193
|
## Star History
|
|
248
194
|
|
|
249
|
-
[](https://star-history.com/#002-sans/djs-selfbot-v13&Date)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "djs-selfbot-v13",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.10",
|
|
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/
|
|
32
|
+
"url": "git+https://github.com/002-sans/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/
|
|
50
|
+
"url": "https://github.com/002-sans/djs-selfbot-v13/issues"
|
|
51
51
|
},
|
|
52
|
-
"homepage": "https://github.com/
|
|
52
|
+
"homepage": "https://github.com/002-sans/djs-selfbot-v13#readme",
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@discordjs/builders": "^1.6.3",
|
|
55
55
|
"@discordjs/collection": "^2.1.1",
|
|
@@ -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/
|
|
22
|
+
* @deprecated See {@link https://github.com/aiko-chan-ai/discord.js-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/
|
|
28
|
+
* @deprecated See {@link https://github.com/aiko-chan-ai/discord.js-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/
|
|
15
|
+
* @deprecated See {@link https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues/197 this issue} for more information.
|
|
16
16
|
*/
|
|
17
17
|
client.emit(Events.GUILD_MEMBER_ADD, member);
|
|
18
18
|
}
|
|
@@ -161,7 +161,7 @@ class ThreadManager extends CachedManager {
|
|
|
161
161
|
// Discord sends the thread id as id in this object
|
|
162
162
|
for (const rawMember of rawThreads.members) client.channels.cache.get(rawMember.id)?.members._add(rawMember);
|
|
163
163
|
// Patch firstMessage
|
|
164
|
-
// According to https://github.com/aiko-chan-ai/
|
|
164
|
+
// According to https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues/1502, rawThreads.first_messages could be null.
|
|
165
165
|
for (const rawMessage of rawThreads?.first_messages || []) {
|
|
166
166
|
client.channels.cache.get(rawMessage.id)?.messages._add(rawMessage);
|
|
167
167
|
}
|
|
@@ -203,7 +203,7 @@ class ClientUser extends User {
|
|
|
203
203
|
* @example
|
|
204
204
|
* // Set the client user's presence
|
|
205
205
|
* client.user.setPresence({ activities: [{ name: 'with discord.js' }], status: 'idle' });
|
|
206
|
-
* @see {@link https://github.com/
|
|
206
|
+
* @see {@link https://github.com/002-sans/djs-selfbot-v13/blob/main/Document/RichPresence.md}
|
|
207
207
|
*/
|
|
208
208
|
setPresence(data) {
|
|
209
209
|
return this.client.presence.set(data);
|
|
@@ -248,7 +248,7 @@ class ClientUser extends User {
|
|
|
248
248
|
* @example
|
|
249
249
|
* // Set the client user's activity
|
|
250
250
|
* client.user.setActivity('discord.js', { type: 'WATCHING' });
|
|
251
|
-
* @see {@link https://github.com/
|
|
251
|
+
* @see {@link https://github.com/002-sans/djs-selfbot-v13/blob/main/Document/RichPresence.md}
|
|
252
252
|
*/
|
|
253
253
|
setActivity(name, options = {}) {
|
|
254
254
|
if (!name) return this.setPresence({ activities: [], shardId: options.shardId });
|
|
@@ -635,7 +635,7 @@ class ClientUser extends User {
|
|
|
635
635
|
* @returns {Promise<ClientUser>}
|
|
636
636
|
*/
|
|
637
637
|
setClan(guild) {
|
|
638
|
-
const id = this.guilds.resolveId(guild);
|
|
638
|
+
const id = this.client.guilds.resolveId(guild);
|
|
639
639
|
if (!id) throw new TypeError('INVALID_TYPE', 'guild', 'GuildResolvable');
|
|
640
640
|
|
|
641
641
|
return this.client.api.users['@me'].clan.put({ data: { identity_guild_id: id, identity_enabled: true } });
|
|
@@ -304,6 +304,16 @@ class Activity {
|
|
|
304
304
|
this.details = null;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
+
if ('details_url' in data) {
|
|
308
|
+
/**
|
|
309
|
+
* URL for the details of the activity
|
|
310
|
+
* @type {?string}
|
|
311
|
+
*/
|
|
312
|
+
this.details_url = data.details_url;
|
|
313
|
+
} else {
|
|
314
|
+
this.details_url = null;
|
|
315
|
+
}
|
|
316
|
+
|
|
307
317
|
if ('state' in data) {
|
|
308
318
|
/**
|
|
309
319
|
* State of the activity
|
|
@@ -314,6 +324,16 @@ class Activity {
|
|
|
314
324
|
this.state = null;
|
|
315
325
|
}
|
|
316
326
|
|
|
327
|
+
if ('state_url' in data) {
|
|
328
|
+
/**
|
|
329
|
+
* URL for the state of the activity
|
|
330
|
+
* @type {?string}
|
|
331
|
+
*/
|
|
332
|
+
this.state_url = data.state_url;
|
|
333
|
+
} else {
|
|
334
|
+
this.state_url = null;
|
|
335
|
+
}
|
|
336
|
+
|
|
317
337
|
if ('sync_id' in data || 'syncId' in data) {
|
|
318
338
|
/**
|
|
319
339
|
* The sync id of the activity
|
package/typings/index.d.ts
CHANGED
|
@@ -285,6 +285,7 @@ export class Activity {
|
|
|
285
285
|
public readonly createdAt: Date;
|
|
286
286
|
public createdTimestamp: number;
|
|
287
287
|
public details: string | null;
|
|
288
|
+
public details_url: string | null;
|
|
288
289
|
public emoji: EmojiIdentifierResolvable | null;
|
|
289
290
|
public flags: Readonly<ActivityFlags>;
|
|
290
291
|
public id: string;
|
|
@@ -296,6 +297,7 @@ export class Activity {
|
|
|
296
297
|
public platform: ActivityPlatform | null;
|
|
297
298
|
public sessionId: string | null;
|
|
298
299
|
public state: string | null;
|
|
300
|
+
public state_url: string | null;
|
|
299
301
|
public syncId: string | null;
|
|
300
302
|
public timestamps: {
|
|
301
303
|
start: number | null;
|