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