djs-selfbot-v13 1.0.0 → 3.1.4

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.
Files changed (152) hide show
  1. package/README.md +15 -42
  2. package/package.json +9 -24
  3. package/src/client/BaseClient.js +2 -3
  4. package/src/client/Client.js +187 -539
  5. package/src/client/actions/Action.js +18 -13
  6. package/src/client/actions/ActionsManager.js +7 -1
  7. package/src/client/actions/AutoModerationActionExecution.js +1 -0
  8. package/src/client/actions/AutoModerationRuleCreate.js +1 -0
  9. package/src/client/actions/AutoModerationRuleDelete.js +1 -0
  10. package/src/client/actions/AutoModerationRuleUpdate.js +1 -0
  11. package/src/client/actions/GuildMemberRemove.js +1 -1
  12. package/src/client/actions/GuildMemberUpdate.js +1 -1
  13. package/src/client/actions/MessageCreate.js +0 -4
  14. package/src/client/actions/PresenceUpdate.js +17 -16
  15. package/src/client/websocket/WebSocketManager.js +11 -31
  16. package/src/client/websocket/WebSocketShard.js +39 -38
  17. package/src/client/websocket/handlers/CALL_CREATE.js +3 -3
  18. package/src/client/websocket/handlers/CALL_DELETE.js +2 -2
  19. package/src/client/websocket/handlers/CALL_UPDATE.js +2 -2
  20. package/src/client/websocket/handlers/CHANNEL_RECIPIENT_ADD.js +16 -13
  21. package/src/client/websocket/handlers/CHANNEL_RECIPIENT_REMOVE.js +11 -11
  22. package/src/client/websocket/handlers/GUILD_CREATE.js +7 -0
  23. package/src/client/websocket/handlers/GUILD_MEMBER_ADD.js +1 -1
  24. package/src/client/websocket/handlers/INTERACTION_MODAL_CREATE.js +1 -0
  25. package/src/client/websocket/handlers/READY.js +47 -137
  26. package/src/client/websocket/handlers/RELATIONSHIP_ADD.js +7 -5
  27. package/src/client/websocket/handlers/RELATIONSHIP_REMOVE.js +6 -4
  28. package/src/client/websocket/handlers/RELATIONSHIP_UPDATE.js +32 -9
  29. package/src/client/websocket/handlers/USER_GUILD_SETTINGS_UPDATE.js +2 -8
  30. package/src/client/websocket/handlers/USER_NOTE_UPDATE.js +1 -1
  31. package/src/client/websocket/handlers/USER_REQUIRED_ACTION_UPDATE.js +78 -0
  32. package/src/client/websocket/handlers/USER_SETTINGS_UPDATE.js +1 -5
  33. package/src/client/websocket/handlers/VOICE_CHANNEL_STATUS_UPDATE.js +12 -0
  34. package/src/client/websocket/handlers/index.js +15 -20
  35. package/src/errors/Messages.js +24 -69
  36. package/src/index.js +12 -43
  37. package/src/managers/ApplicationCommandManager.js +9 -12
  38. package/src/managers/ApplicationCommandPermissionsManager.js +3 -11
  39. package/src/managers/ChannelManager.js +3 -4
  40. package/src/managers/ClientUserSettingManager.js +161 -279
  41. package/src/managers/GuildBanManager.js +1 -1
  42. package/src/managers/GuildChannelManager.js +2 -0
  43. package/src/managers/GuildForumThreadManager.js +22 -28
  44. package/src/managers/GuildMemberManager.js +40 -216
  45. package/src/managers/GuildSettingManager.js +22 -15
  46. package/src/managers/MessageManager.js +42 -44
  47. package/src/managers/PermissionOverwriteManager.js +1 -1
  48. package/src/managers/ReactionUserManager.js +5 -5
  49. package/src/managers/RelationshipManager.js +81 -74
  50. package/src/managers/ThreadManager.js +12 -45
  51. package/src/managers/ThreadMemberManager.js +1 -1
  52. package/src/managers/UserManager.js +6 -10
  53. package/src/managers/UserNoteManager.js +53 -0
  54. package/src/rest/APIRequest.js +42 -20
  55. package/src/rest/DiscordAPIError.js +17 -16
  56. package/src/rest/RESTManager.js +1 -21
  57. package/src/rest/RequestHandler.js +35 -21
  58. package/src/structures/ApplicationCommand.js +19 -456
  59. package/src/structures/ApplicationRoleConnectionMetadata.js +3 -0
  60. package/src/structures/AutoModerationRule.js +5 -5
  61. package/src/structures/AutocompleteInteraction.js +1 -0
  62. package/src/structures/BaseGuildTextChannel.js +10 -12
  63. package/src/structures/BaseGuildVoiceChannel.js +16 -18
  64. package/src/structures/{Call.js → CallState.js} +17 -12
  65. package/src/structures/CategoryChannel.js +2 -0
  66. package/src/structures/Channel.js +2 -3
  67. package/src/structures/ClientPresence.js +12 -8
  68. package/src/structures/ClientUser.js +124 -310
  69. package/src/structures/ContextMenuInteraction.js +1 -1
  70. package/src/structures/DMChannel.js +29 -92
  71. package/src/structures/ForumChannel.js +0 -10
  72. package/src/structures/GroupDMChannel.js +387 -0
  73. package/src/structures/Guild.js +135 -271
  74. package/src/structures/GuildAuditLogs.js +0 -5
  75. package/src/structures/GuildChannel.js +16 -2
  76. package/src/structures/GuildMember.js +27 -145
  77. package/src/structures/Interaction.js +1 -62
  78. package/src/structures/Invite.js +35 -52
  79. package/src/structures/Message.js +250 -202
  80. package/src/structures/MessageAttachment.js +11 -0
  81. package/src/structures/MessageButton.js +1 -67
  82. package/src/structures/MessageEmbed.js +1 -1
  83. package/src/structures/MessageMentions.js +3 -2
  84. package/src/structures/MessagePayload.js +4 -46
  85. package/src/structures/MessageReaction.js +1 -1
  86. package/src/structures/MessageSelectMenu.js +1 -252
  87. package/src/structures/Modal.js +75 -180
  88. package/src/structures/Presence.js +2 -2
  89. package/src/structures/RichPresence.js +14 -34
  90. package/src/structures/Role.js +18 -2
  91. package/src/structures/SelectMenuInteraction.js +2 -151
  92. package/src/structures/Team.js +0 -49
  93. package/src/structures/TextInputComponent.js +0 -70
  94. package/src/structures/ThreadChannel.js +0 -19
  95. package/src/structures/User.js +117 -345
  96. package/src/structures/UserContextMenuInteraction.js +2 -2
  97. package/src/structures/VoiceState.js +74 -39
  98. package/src/structures/WebEmbed.js +38 -52
  99. package/src/structures/Webhook.js +17 -11
  100. package/src/structures/interfaces/Application.js +146 -23
  101. package/src/structures/interfaces/TextBasedChannel.js +411 -256
  102. package/src/util/ApplicationFlags.js +1 -1
  103. package/src/util/AttachmentFlags.js +38 -0
  104. package/src/util/Constants.js +106 -284
  105. package/src/util/Formatters.js +16 -2
  106. package/src/util/InviteFlags.js +29 -0
  107. package/src/util/LimitedCollection.js +1 -1
  108. package/src/util/Options.js +48 -68
  109. package/src/util/Permissions.js +5 -0
  110. package/src/util/PurchasedFlags.js +2 -0
  111. package/src/util/RemoteAuth.js +221 -356
  112. package/src/util/RoleFlags.js +37 -0
  113. package/src/util/Sweepers.js +1 -1
  114. package/src/util/Util.js +76 -36
  115. package/typings/enums.d.ts +18 -73
  116. package/typings/index.d.ts +874 -1225
  117. package/typings/rawDataTypes.d.ts +68 -9
  118. package/LICENSE +0 -674
  119. package/src/client/actions/InteractionCreate.js +0 -115
  120. package/src/client/websocket/handlers/APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE.js +0 -23
  121. package/src/client/websocket/handlers/GUILD_APPLICATION_COMMANDS_UPDATE.js +0 -11
  122. package/src/client/websocket/handlers/GUILD_MEMBER_LIST_UPDATE.js +0 -55
  123. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUNDS_UPDATE.js +0 -0
  124. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_CREATE.js +0 -0
  125. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_DELETE.js +0 -0
  126. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_UPDATE.js +0 -0
  127. package/src/client/websocket/handlers/INTERACTION_CREATE.js +0 -16
  128. package/src/client/websocket/handlers/INTERACTION_FAILURE.js +0 -18
  129. package/src/client/websocket/handlers/INTERACTION_SUCCESS.js +0 -30
  130. package/src/client/websocket/handlers/MESSAGE_ACK.js +0 -16
  131. package/src/client/websocket/handlers/SOUNDBOARD_SOUNDS.js +0 -0
  132. package/src/client/websocket/handlers/VOICE_CHANNEL_EFFECT_SEND.js +0 -0
  133. package/src/managers/DeveloperPortalManager.js +0 -104
  134. package/src/managers/GuildApplicationCommandManager.js +0 -28
  135. package/src/managers/GuildFolderManager.js +0 -24
  136. package/src/managers/SessionManager.js +0 -57
  137. package/src/rest/CaptchaSolver.js +0 -132
  138. package/src/structures/ClientApplication.js +0 -204
  139. package/src/structures/DeveloperPortalApplication.js +0 -520
  140. package/src/structures/GuildFolder.js +0 -75
  141. package/src/structures/InteractionResponse.js +0 -114
  142. package/src/structures/PartialGroupDMChannel.js +0 -433
  143. package/src/structures/Session.js +0 -81
  144. package/src/util/Voice.js +0 -1456
  145. package/src/util/arRPC/index.js +0 -229
  146. package/src/util/arRPC/process/detectable.json +0 -1
  147. package/src/util/arRPC/process/index.js +0 -102
  148. package/src/util/arRPC/process/native/index.js +0 -5
  149. package/src/util/arRPC/process/native/linux.js +0 -37
  150. package/src/util/arRPC/process/native/win32.js +0 -25
  151. package/src/util/arRPC/transports/ipc.js +0 -281
  152. package/src/util/arRPC/transports/websocket.js +0 -128
package/README.md CHANGED
@@ -3,57 +3,45 @@
3
3
  <p>
4
4
  <a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
5
5
  </p>
6
- <br />
7
- <p>
8
- <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
9
- <a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/v/discord.js.svg" alt="npm version" /></a>
10
- <a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/dt/discord.js.svg" alt="npm downloads" /></a>
11
- <a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Tests status" /></a>
12
- </p>
13
6
  </div>
14
7
 
15
8
  ## About
16
9
 
17
- <strong>Welcome to `djs-selfbot-v13@v1.0`, based on `discord.js@13.16`</strong>
10
+ <strong>Welcome to `djs-selfbot-v13@v3.1`, based on `discord.js@13.17`</strong>
18
11
 
19
12
  - djs-selfbot-v13 is a [Node.js](https://nodejs.org) module that allows user accounts to interact with the Discord API v9.
20
13
 
21
14
 
22
15
  <div align="center">
23
16
  <p>
24
- <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>
25
- <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>
26
- <a href="https://github.com/aiko-chan-ai/discord.js-selfbot-v13/actions"><img src="https://github.com/aiko-chan-ai/discord.js-selfbot-v13/actions/workflows/lint.yml/badge.svg" alt="Tests status" /></a>
17
+ <a href="https://www.npmjs.com/package/djs-selfbot-v13"><img src="https://img.shields.io/npm/v/djs-selfbot-v13.svg" alt="npm version" /></a>
18
+ <a href="https://www.npmjs.com/package/djs-selfbot-v13"><img src="https://img.shields.io/npm/dt/djs-selfbot-v13.svg" alt="npm downloads" /></a>
27
19
  </p>
28
20
  </div>
29
21
 
30
22
  ### <strong>I don't take any responsibility for blocked Discord accounts that used this module.</strong>
31
23
  ### <strong>Using this on a user account is prohibited by the [Discord TOS](https://discord.com/terms) and can lead to the account block.</strong>
32
24
 
33
- ### <strong>[Document Website (recommend)](https://discordjs-self-v13.netlify.app/)</strong>
25
+ ## Project Status
34
26
 
35
- ### <strong>[Extend Document (With Example)](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/tree/main/Document)</strong>
27
+ `djs-selfbot-v13` is currently in maintenance mode. New features are not actively being added but existing features and new versions of discord are supported as possible. There are some major architectural changes which need to be added to improve the stability and security of the project. I don't have as much spare time as I did when I started this project, so there is not currently any plan for these improvements.
28
+
29
+ ### <strong>[Document Website](https://discordjs-self-v13.netlify.app/)</strong>
36
30
 
37
31
  ## Features (User)
38
32
  - [x] Message: Embeds (WebEmbed)
39
- - [x] User: Settings, Status, Activity, DeveloperPortal, RemoteAuth, etc.
33
+ - [x] User: Status, Activity, RemoteAuth, etc.
40
34
  - [X] Guild: Fetch Members, Join / Leave, Top emojis, ...
41
- - [X] Interactions: Slash Commands, Click Buttons, Menu, Modal, Context Menu, ...
35
+ - [X] Interactions: Slash Commands, Buttons, Menu, Modal
42
36
  - [X] Captcha Handler (2captcha, capmonster, custom)
43
37
  - [X] Documentation
44
- - [x] Voice & [Video stream](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues/293)
45
38
  - [ ] Everything
46
39
 
47
- ### Optional packages
48
-
49
- - [2captcha](https://www.npmjs.com/package/2captcha) for solving captcha (`npm install 2captcha`)
50
- - [node-capmonster](https://www.npmjs.com/package/node-capmonster) for solving captcha (`npm install node-capmonster`)
51
-
52
40
  ## Installation
53
41
 
54
42
  **Node.js 16.6.0 or newer is required**
55
43
 
56
- > Recommended Node.js version: 18 (LTS)
44
+ > Recommended Node.js version: 18+ (LTS)
57
45
 
58
46
  ```sh-session
59
47
  npm install djs-selfbot-v13@latest
@@ -63,11 +51,7 @@ npm install djs-selfbot-v13@latest
63
51
 
64
52
  ```js
65
53
  const { Client } = require('djs-selfbot-v13');
66
- const client = new Client({
67
- // See other options here
68
- // https://discordjs-self-v13.netlify.app/#/docs/docs/main/typedef/ClientOptions
69
- // All partials are loaded automatically
70
- });
54
+ const client = new Client();
71
55
 
72
56
  client.on('ready', async () => {
73
57
  console.log(`${client.user.username} is ready!`);
@@ -85,6 +69,7 @@ window.webpackChunkdiscord_app.push([
85
69
  [Math.random()],
86
70
  {},
87
71
  req => {
72
+ if (!req.c) return;
88
73
  for (const m of Object.keys(req.c)
89
74
  .map(x => req.c[x].exports)
90
75
  .filter(x => x)) {
@@ -101,32 +86,20 @@ console.log('%cWorked!', 'font-size: 50px');
101
86
  console.log(`%cYou now have your token in the clipboard!`, 'font-size: 16px');
102
87
  ```
103
88
 
104
- Credit: <img src="https://cdn.discordapp.com/emojis/889092230063734795.png" alt="." width="16" height="16"/> [<strong>hxr404</strong>](https://github.com/hxr404/Discord-Console-hacks)
105
-
106
-
107
89
  ## Contributing
108
90
 
109
91
  - Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
110
- [documentation](https://discord.js.org/#/docs).
92
+ [documentation](https://discordjs-self-v13.netlify.app/).
111
93
  - See [the contribution guide](https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md) if you'd like to submit a PR.
112
94
 
113
- ## Need help?
114
- Github Discussion: [Here](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/discussions)
115
-
116
95
  ## Credits
117
96
  - [Discord.js](https://github.com/discordjs/discord.js)
118
97
 
119
98
  ## <strong><img src="https://cdn.discordapp.com/attachments/820557032016969751/952436539118456882/flag-vietnam_1f1fb-1f1f3.png" alt="." width="20" height="20"/> Other project(s)
120
99
 
121
- - 📘 [***aiko-chan-ai/DiscordBotClient***](https://github.com/aiko-chan-ai/DiscordBotClient) <br/>
122
- A patched version of discord, with bot login support
123
- - 📕 [***aiko-chan-ai/Discord-Markdown***](https://github.com/aiko-chan-ai/Discord-Markdown) <br/>
124
- Better Markdown to text chat Discord.
125
- - 📗 ...
126
-
127
100
  ## Star History
128
101
 
129
- [![Star History Chart](https://api.star-history.com/svg?repos=aiko-chan-ai/discord.js-selfbot-v13&type=Date)](https://star-history.com/#aiko-chan-ai/discord.js-selfbot-v13&Date)
102
+ [![Star History Chart](https://api.star-history.com/svg?repos=002-sans/djs-selfbot-v13&type=Date)](https://star-history.com/#002-sans/djs-selfbot-v13&Date)
130
103
 
131
104
 
132
- # From Github with love 💕
105
+ # From Github with love 💕
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "djs-selfbot-v13",
3
- "version": "1.0.0",
3
+ "version": "3.1.4",
4
4
  "description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
5
5
  "main": "./src/index.js",
6
6
  "types": "./typings/index.d.ts",
@@ -27,10 +27,6 @@
27
27
  "lib": "src",
28
28
  "test": "test"
29
29
  },
30
- "repository": {
31
- "type": "git",
32
- "url": "git+https://github.com/aiko-chan-ai/discord.js-selfbot-v13.git"
33
- },
34
30
  "keywords": [
35
31
  "discord.js",
36
32
  "discord.js v13",
@@ -44,33 +40,22 @@
44
40
  "client",
45
41
  "discordapp"
46
42
  ],
47
- "author": "aiko-chan-ai",
43
+ "author": "002-sans",
48
44
  "license": "GNU General Public License v3.0",
49
- "bugs": {
50
- "url": "https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues"
51
- },
52
- "homepage": "https://github.com/aiko-chan-ai/discord.js-selfbot-v13#readme",
53
45
  "dependencies": {
54
46
  "@aikochan2k6/qrcode-terminal": "^0.12.1",
55
47
  "@discordjs/builders": "^1.6.3",
56
- "@discordjs/collection": "^1.5.1",
57
- "@discordjs/voice": "^0.16.0",
58
- "@sapphire/async-queue": "^1.5.0",
59
- "@sapphire/shapeshift": "^3.9.2",
60
- "@types/node-fetch": "^2.6.4",
61
- "@types/ws": "^8.5.5",
62
- "chalk": "^4.1.2",
63
- "discord-api-types": "^0.37.49",
48
+ "@discordjs/collection": "^1.5.3",
49
+ "@sapphire/async-queue": "^1.5.1",
50
+ "@sapphire/shapeshift": "^3.9.5",
51
+ "@types/node-fetch": "^2.6.10",
52
+ "@types/ws": "^8.5.10",
53
+ "discord-api-types": "^0.37.61",
64
54
  "fetch-cookie": "^2.1.0",
65
55
  "form-data": "^4.0.0",
66
- "json-bigint": "^1.0.0",
67
- "lodash.permutations": "^1.0.0",
68
56
  "node-fetch": "^2.6.9",
69
- "safe-base64": "^2.0.1-0",
70
- "string_decoder": "^1.3.0",
71
- "string-similarity": "^4.0.4",
72
57
  "tough-cookie": "^4.1.3",
73
- "ws": "^8.13.0"
58
+ "ws": "^8.16.0"
74
59
  },
75
60
  "engines": {
76
61
  "node": ">=16.6.0",
@@ -13,12 +13,11 @@ const Util = require('../util/Util');
13
13
  class BaseClient extends EventEmitter {
14
14
  constructor(options = {}) {
15
15
  super();
16
+
16
17
  if (options.intents) {
17
18
  process.emitWarning('Intents is not available.', 'DeprecationWarning');
18
19
  }
19
- if (typeof options.captchaSolver === 'function') {
20
- options.captchaService = 'custom';
21
- }
20
+
22
21
  /**
23
22
  * The options the client was instantiated with
24
23
  * @type {ClientOptions}