djs-selfbot-v13 3.1.5 → 3.1.7

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/LICENSE +674 -0
  2. package/README.md +42 -15
  3. package/package.json +24 -9
  4. package/src/client/BaseClient.js +3 -2
  5. package/src/client/Client.js +539 -187
  6. package/src/client/actions/Action.js +13 -18
  7. package/src/client/actions/ActionsManager.js +1 -7
  8. package/src/client/actions/AutoModerationActionExecution.js +0 -1
  9. package/src/client/actions/AutoModerationRuleCreate.js +0 -1
  10. package/src/client/actions/AutoModerationRuleDelete.js +0 -1
  11. package/src/client/actions/AutoModerationRuleUpdate.js +0 -1
  12. package/src/client/actions/GuildMemberRemove.js +1 -1
  13. package/src/client/actions/GuildMemberUpdate.js +1 -1
  14. package/src/client/actions/InteractionCreate.js +115 -0
  15. package/src/client/actions/MessageCreate.js +4 -0
  16. package/src/client/actions/PresenceUpdate.js +16 -17
  17. package/src/client/websocket/WebSocketManager.js +31 -11
  18. package/src/client/websocket/WebSocketShard.js +38 -39
  19. package/src/client/websocket/handlers/APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE.js +23 -0
  20. package/src/client/websocket/handlers/CALL_CREATE.js +3 -3
  21. package/src/client/websocket/handlers/CALL_DELETE.js +2 -2
  22. package/src/client/websocket/handlers/CALL_UPDATE.js +2 -2
  23. package/src/client/websocket/handlers/CHANNEL_RECIPIENT_ADD.js +13 -16
  24. package/src/client/websocket/handlers/CHANNEL_RECIPIENT_REMOVE.js +11 -11
  25. package/src/client/websocket/handlers/GUILD_APPLICATION_COMMANDS_UPDATE.js +11 -0
  26. package/src/client/websocket/handlers/GUILD_CREATE.js +0 -7
  27. package/src/client/websocket/handlers/GUILD_MEMBER_ADD.js +1 -1
  28. package/src/client/websocket/handlers/GUILD_MEMBER_LIST_UPDATE.js +55 -0
  29. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUNDS_UPDATE.js +0 -0
  30. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_CREATE.js +0 -0
  31. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_DELETE.js +0 -0
  32. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_UPDATE.js +0 -0
  33. package/src/client/websocket/handlers/INTERACTION_CREATE.js +16 -0
  34. package/src/client/websocket/handlers/INTERACTION_FAILURE.js +18 -0
  35. package/src/client/websocket/handlers/INTERACTION_MODAL_CREATE.js +0 -1
  36. package/src/client/websocket/handlers/INTERACTION_SUCCESS.js +30 -0
  37. package/src/client/websocket/handlers/MESSAGE_ACK.js +16 -0
  38. package/src/client/websocket/handlers/READY.js +137 -47
  39. package/src/client/websocket/handlers/RELATIONSHIP_ADD.js +5 -7
  40. package/src/client/websocket/handlers/RELATIONSHIP_REMOVE.js +4 -6
  41. package/src/client/websocket/handlers/RELATIONSHIP_UPDATE.js +9 -32
  42. package/src/client/websocket/handlers/SOUNDBOARD_SOUNDS.js +0 -0
  43. package/src/client/websocket/handlers/USER_GUILD_SETTINGS_UPDATE.js +8 -2
  44. package/src/client/websocket/handlers/USER_NOTE_UPDATE.js +1 -1
  45. package/src/client/websocket/handlers/USER_SETTINGS_UPDATE.js +5 -1
  46. package/src/client/websocket/handlers/VOICE_CHANNEL_EFFECT_SEND.js +0 -0
  47. package/src/client/websocket/handlers/index.js +20 -15
  48. package/src/errors/Messages.js +69 -24
  49. package/src/index.js +43 -12
  50. package/src/managers/ApplicationCommandManager.js +12 -9
  51. package/src/managers/ApplicationCommandPermissionsManager.js +11 -3
  52. package/src/managers/ChannelManager.js +4 -2
  53. package/src/managers/ClientUserSettingManager.js +279 -161
  54. package/src/managers/DeveloperPortalManager.js +104 -0
  55. package/src/managers/GuildApplicationCommandManager.js +28 -0
  56. package/src/managers/GuildBanManager.js +1 -1
  57. package/src/managers/GuildChannelManager.js +0 -2
  58. package/src/managers/GuildFolderManager.js +24 -0
  59. package/src/managers/GuildForumThreadManager.js +28 -22
  60. package/src/managers/GuildMemberManager.js +216 -40
  61. package/src/managers/GuildSettingManager.js +15 -22
  62. package/src/managers/MessageManager.js +44 -42
  63. package/src/managers/PermissionOverwriteManager.js +1 -1
  64. package/src/managers/ReactionUserManager.js +5 -5
  65. package/src/managers/RelationshipManager.js +74 -81
  66. package/src/managers/SessionManager.js +57 -0
  67. package/src/managers/ThreadManager.js +45 -12
  68. package/src/managers/ThreadMemberManager.js +1 -1
  69. package/src/managers/UserManager.js +10 -6
  70. package/src/rest/APIRequest.js +20 -42
  71. package/src/rest/CaptchaSolver.js +132 -0
  72. package/src/rest/DiscordAPIError.js +16 -17
  73. package/src/rest/RESTManager.js +21 -1
  74. package/src/rest/RequestHandler.js +21 -35
  75. package/src/structures/ApplicationCommand.js +456 -19
  76. package/src/structures/ApplicationRoleConnectionMetadata.js +0 -3
  77. package/src/structures/AutoModerationRule.js +5 -5
  78. package/src/structures/AutocompleteInteraction.js +0 -1
  79. package/src/structures/BaseGuildTextChannel.js +12 -10
  80. package/src/structures/BaseGuildVoiceChannel.js +18 -16
  81. package/src/structures/{CallState.js → Call.js} +12 -17
  82. package/src/structures/CategoryChannel.js +0 -2
  83. package/src/structures/Channel.js +3 -2
  84. package/src/structures/ClientApplication.js +204 -0
  85. package/src/structures/ClientPresence.js +8 -12
  86. package/src/structures/ClientUser.js +338 -117
  87. package/src/structures/ContextMenuInteraction.js +1 -1
  88. package/src/structures/DMChannel.js +92 -29
  89. package/src/structures/DeveloperPortalApplication.js +520 -0
  90. package/src/structures/ForumChannel.js +10 -0
  91. package/src/structures/Guild.js +271 -135
  92. package/src/structures/GuildAuditLogs.js +5 -0
  93. package/src/structures/GuildChannel.js +2 -16
  94. package/src/structures/GuildFolder.js +75 -0
  95. package/src/structures/GuildMember.js +145 -27
  96. package/src/structures/Interaction.js +62 -1
  97. package/src/structures/InteractionResponse.js +114 -0
  98. package/src/structures/Invite.js +52 -35
  99. package/src/structures/Message.js +202 -222
  100. package/src/structures/MessageAttachment.js +0 -11
  101. package/src/structures/MessageButton.js +67 -1
  102. package/src/structures/MessageEmbed.js +1 -1
  103. package/src/structures/MessageMentions.js +2 -3
  104. package/src/structures/MessagePayload.js +46 -4
  105. package/src/structures/MessageReaction.js +1 -1
  106. package/src/structures/MessageSelectMenu.js +252 -1
  107. package/src/structures/Modal.js +180 -75
  108. package/src/structures/PartialGroupDMChannel.js +433 -0
  109. package/src/structures/Presence.js +2 -2
  110. package/src/structures/RichPresence.js +34 -14
  111. package/src/structures/Role.js +2 -18
  112. package/src/structures/SelectMenuInteraction.js +151 -2
  113. package/src/structures/Session.js +81 -0
  114. package/src/structures/Team.js +49 -0
  115. package/src/structures/TextInputComponent.js +70 -0
  116. package/src/structures/ThreadChannel.js +19 -0
  117. package/src/structures/User.js +345 -117
  118. package/src/structures/UserContextMenuInteraction.js +2 -2
  119. package/src/structures/VoiceState.js +39 -74
  120. package/src/structures/WebEmbed.js +52 -38
  121. package/src/structures/Webhook.js +11 -17
  122. package/src/structures/interfaces/Application.js +23 -146
  123. package/src/structures/interfaces/TextBasedChannel.js +256 -411
  124. package/src/util/ApplicationFlags.js +1 -1
  125. package/src/util/Constants.js +284 -106
  126. package/src/util/Formatters.js +2 -16
  127. package/src/util/LimitedCollection.js +1 -1
  128. package/src/util/Options.js +68 -48
  129. package/src/util/Permissions.js +0 -5
  130. package/src/util/PurchasedFlags.js +0 -2
  131. package/src/util/RemoteAuth.js +356 -221
  132. package/src/util/Sweepers.js +1 -1
  133. package/src/util/Util.js +36 -76
  134. package/src/util/Voice.js +1456 -0
  135. package/src/util/arRPC/index.js +229 -0
  136. package/src/util/arRPC/process/detectable.json +1 -0
  137. package/src/util/arRPC/process/index.js +102 -0
  138. package/src/util/arRPC/process/native/index.js +5 -0
  139. package/src/util/arRPC/process/native/linux.js +37 -0
  140. package/src/util/arRPC/process/native/win32.js +25 -0
  141. package/src/util/arRPC/transports/ipc.js +281 -0
  142. package/src/util/arRPC/transports/websocket.js +128 -0
  143. package/typings/enums.d.ts +73 -18
  144. package/typings/index.d.ts +1250 -898
  145. package/typings/rawDataTypes.d.ts +9 -68
  146. package/src/client/websocket/handlers/USER_REQUIRED_ACTION_UPDATE.js +0 -78
  147. package/src/client/websocket/handlers/VOICE_CHANNEL_STATUS_UPDATE.js +0 -12
  148. package/src/managers/UserNoteManager.js +0 -53
  149. package/src/structures/GroupDMChannel.js +0 -387
  150. package/src/util/AttachmentFlags.js +0 -38
  151. package/src/util/InviteFlags.js +0 -29
  152. package/src/util/RoleFlags.js +0 -37
package/README.md CHANGED
@@ -3,45 +3,57 @@
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>
6
13
  </div>
7
14
 
8
15
  ## About
9
16
 
10
- <strong>Welcome to `djs-selfbot-v13@v3.1`, based on `discord.js@13.17`</strong>
17
+ <strong>Welcome to `djs-selfbot-v13@v1.0`, based on `discord.js@13.16`</strong>
11
18
 
12
19
  - djs-selfbot-v13 is a [Node.js](https://nodejs.org) module that allows user accounts to interact with the Discord API v9.
13
20
 
14
21
 
15
22
  <div align="center">
16
23
  <p>
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>
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>
19
27
  </p>
20
28
  </div>
21
29
 
22
30
  ### <strong>I don't take any responsibility for blocked Discord accounts that used this module.</strong>
23
31
  ### <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>
24
32
 
25
- ## Project Status
33
+ ### <strong>[Document Website (recommend)](https://discordjs-self-v13.netlify.app/)</strong>
26
34
 
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>
35
+ ### <strong>[Extend Document (With Example)](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/tree/main/Document)</strong>
30
36
 
31
37
  ## Features (User)
32
38
  - [x] Message: Embeds (WebEmbed)
33
- - [x] User: Status, Activity, RemoteAuth, etc.
39
+ - [x] User: Settings, Status, Activity, DeveloperPortal, RemoteAuth, etc.
34
40
  - [X] Guild: Fetch Members, Join / Leave, Top emojis, ...
35
- - [X] Interactions: Slash Commands, Buttons, Menu, Modal
41
+ - [X] Interactions: Slash Commands, Click Buttons, Menu, Modal, Context Menu, ...
36
42
  - [X] Captcha Handler (2captcha, capmonster, custom)
37
43
  - [X] Documentation
44
+ - [x] Voice & [Video stream](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues/293)
38
45
  - [ ] Everything
39
46
 
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
+
40
52
  ## Installation
41
53
 
42
54
  **Node.js 16.6.0 or newer is required**
43
55
 
44
- > Recommended Node.js version: 18+ (LTS)
56
+ > Recommended Node.js version: 18 (LTS)
45
57
 
46
58
  ```sh-session
47
59
  npm install djs-selfbot-v13@latest
@@ -51,7 +63,11 @@ npm install djs-selfbot-v13@latest
51
63
 
52
64
  ```js
53
65
  const { Client } = require('djs-selfbot-v13');
54
- const client = new Client();
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
+ });
55
71
 
56
72
  client.on('ready', async () => {
57
73
  console.log(`${client.user.username} is ready!`);
@@ -69,7 +85,6 @@ window.webpackChunkdiscord_app.push([
69
85
  [Math.random()],
70
86
  {},
71
87
  req => {
72
- if (!req.c) return;
73
88
  for (const m of Object.keys(req.c)
74
89
  .map(x => req.c[x].exports)
75
90
  .filter(x => x)) {
@@ -86,20 +101,32 @@ console.log('%cWorked!', 'font-size: 50px');
86
101
  console.log(`%cYou now have your token in the clipboard!`, 'font-size: 16px');
87
102
  ```
88
103
 
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
+
89
107
  ## Contributing
90
108
 
91
109
  - Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
92
- [documentation](https://discordjs-self-v13.netlify.app/).
110
+ [documentation](https://discord.js.org/#/docs).
93
111
  - See [the contribution guide](https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md) if you'd like to submit a PR.
94
112
 
113
+ ## Need help?
114
+ Github Discussion: [Here](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/discussions)
115
+
95
116
  ## Credits
96
117
  - [Discord.js](https://github.com/discordjs/discord.js)
97
118
 
98
119
  ## <strong><img src="https://cdn.discordapp.com/attachments/820557032016969751/952436539118456882/flag-vietnam_1f1fb-1f1f3.png" alt="." width="20" height="20"/> Other project(s)
99
120
 
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
+
100
127
  ## Star History
101
128
 
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)
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)
103
130
 
104
131
 
105
- # From Github with love 💕
132
+ # From Github with love 💕
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "djs-selfbot-v13",
3
- "version": "3.1.5",
3
+ "version": "3.1.7",
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,6 +27,10 @@
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
+ },
30
34
  "keywords": [
31
35
  "discord.js",
32
36
  "discord.js v13",
@@ -40,22 +44,33 @@
40
44
  "client",
41
45
  "discordapp"
42
46
  ],
43
- "author": "002-sans",
47
+ "author": "aiko-chan-ai",
44
48
  "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",
45
53
  "dependencies": {
46
54
  "@aikochan2k6/qrcode-terminal": "^0.12.1",
47
55
  "@discordjs/builders": "^1.6.3",
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",
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",
54
64
  "fetch-cookie": "^2.1.0",
55
65
  "form-data": "^4.0.0",
66
+ "json-bigint": "^1.0.0",
67
+ "lodash.permutations": "^1.0.0",
56
68
  "node-fetch": "^2.6.9",
69
+ "safe-base64": "^2.0.1-0",
70
+ "string_decoder": "^1.3.0",
71
+ "string-similarity": "^4.0.4",
57
72
  "tough-cookie": "^4.1.3",
58
- "ws": "^8.16.0"
73
+ "ws": "^8.13.0"
59
74
  },
60
75
  "engines": {
61
76
  "node": ">=16.6.0",
@@ -13,11 +13,12 @@ const Util = require('../util/Util');
13
13
  class BaseClient extends EventEmitter {
14
14
  constructor(options = {}) {
15
15
  super();
16
-
17
16
  if (options.intents) {
18
17
  process.emitWarning('Intents is not available.', 'DeprecationWarning');
19
18
  }
20
-
19
+ if (typeof options.captchaSolver === 'function') {
20
+ options.captchaService = 'custom';
21
+ }
21
22
  /**
22
23
  * The options the client was instantiated with
23
24
  * @type {ClientOptions}