discord.js-selfbot-v15 0.0.1-security → 11.6.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of discord.js-selfbot-v15 might be problematic. Click here for more details.

Files changed (175) hide show
  1. package/.tern-project +21 -0
  2. package/LICENSE +190 -0
  3. package/README.md +84 -3
  4. package/browser.js +9 -0
  5. package/package.json +125 -3
  6. package/src/client/Client.js +564 -0
  7. package/src/client/ClientDataManager.js +149 -0
  8. package/src/client/ClientDataResolver.js +376 -0
  9. package/src/client/ClientManager.js +74 -0
  10. package/src/client/WebhookClient.js +118 -0
  11. package/src/client/actions/Action.js +23 -0
  12. package/src/client/actions/ActionsManager.js +43 -0
  13. package/src/client/actions/ChannelCreate.js +11 -0
  14. package/src/client/actions/ChannelDelete.js +38 -0
  15. package/src/client/actions/ChannelUpdate.js +74 -0
  16. package/src/client/actions/GuildBanRemove.js +13 -0
  17. package/src/client/actions/GuildChannelsPositionUpdate.js +19 -0
  18. package/src/client/actions/GuildDelete.js +57 -0
  19. package/src/client/actions/GuildEmojiCreate.js +17 -0
  20. package/src/client/actions/GuildEmojiDelete.js +18 -0
  21. package/src/client/actions/GuildEmojiUpdate.js +17 -0
  22. package/src/client/actions/GuildEmojisUpdate.js +38 -0
  23. package/src/client/actions/GuildMemberGet.js +10 -0
  24. package/src/client/actions/GuildMemberRemove.js +41 -0
  25. package/src/client/actions/GuildRoleCreate.js +26 -0
  26. package/src/client/actions/GuildRoleDelete.js +42 -0
  27. package/src/client/actions/GuildRoleUpdate.js +41 -0
  28. package/src/client/actions/GuildRolesPositionUpdate.js +19 -0
  29. package/src/client/actions/GuildSync.js +29 -0
  30. package/src/client/actions/GuildUpdate.js +34 -0
  31. package/src/client/actions/InviteCreate.js +29 -0
  32. package/src/client/actions/InviteDelete.js +25 -0
  33. package/src/client/actions/MessageCreate.js +53 -0
  34. package/src/client/actions/MessageDelete.js +35 -0
  35. package/src/client/actions/MessageDeleteBulk.js +26 -0
  36. package/src/client/actions/MessageReactionAdd.js +37 -0
  37. package/src/client/actions/MessageReactionRemove.js +37 -0
  38. package/src/client/actions/MessageReactionRemoveAll.js +25 -0
  39. package/src/client/actions/MessageReactionRemoveEmoji.js +27 -0
  40. package/src/client/actions/MessageUpdate.js +40 -0
  41. package/src/client/actions/UserGet.js +11 -0
  42. package/src/client/actions/UserNoteUpdate.js +30 -0
  43. package/src/client/actions/UserUpdate.js +33 -0
  44. package/src/client/rest/APIRequest.js +56 -0
  45. package/src/client/rest/DiscordAPIError.js +60 -0
  46. package/src/client/rest/RESTManager.js +58 -0
  47. package/src/client/rest/RESTMethods.js +1067 -0
  48. package/src/client/rest/RequestHandlers/Burst.js +90 -0
  49. package/src/client/rest/RequestHandlers/RequestHandler.js +54 -0
  50. package/src/client/rest/RequestHandlers/Sequential.js +132 -0
  51. package/src/client/rest/UserAgentManager.js +25 -0
  52. package/src/client/voice/ClientVoiceManager.js +86 -0
  53. package/src/client/voice/VoiceBroadcast.js +366 -0
  54. package/src/client/voice/VoiceConnection.js +598 -0
  55. package/src/client/voice/VoiceUDPClient.js +127 -0
  56. package/src/client/voice/VoiceWebSocket.js +246 -0
  57. package/src/client/voice/dispatcher/StreamDispatcher.js +331 -0
  58. package/src/client/voice/opus/BaseOpusEngine.js +60 -0
  59. package/src/client/voice/opus/DiscordJsOpusEngine.js +34 -0
  60. package/src/client/voice/opus/NodeOpusEngine.js +34 -0
  61. package/src/client/voice/opus/OpusEngineList.js +29 -0
  62. package/src/client/voice/opus/OpusScriptEngine.js +39 -0
  63. package/src/client/voice/player/AudioPlayer.js +171 -0
  64. package/src/client/voice/receiver/VoiceReadable.js +17 -0
  65. package/src/client/voice/receiver/VoiceReceiver.js +220 -0
  66. package/src/client/voice/util/SecretKey.js +16 -0
  67. package/src/client/voice/util/Secretbox.js +33 -0
  68. package/src/client/voice/util/Silence.js +16 -0
  69. package/src/client/voice/util/SingleSilence.js +17 -0
  70. package/src/client/voice/util/VolumeInterface.js +86 -0
  71. package/src/client/websocket/WebSocketConnection.js +509 -0
  72. package/src/client/websocket/WebSocketManager.js +90 -0
  73. package/src/client/websocket/packets/WebSocketPacketManager.js +113 -0
  74. package/src/client/websocket/packets/handlers/AbstractHandler.js +11 -0
  75. package/src/client/websocket/packets/handlers/ChannelCreate.js +17 -0
  76. package/src/client/websocket/packets/handlers/ChannelDelete.js +20 -0
  77. package/src/client/websocket/packets/handlers/ChannelPinsUpdate.js +37 -0
  78. package/src/client/websocket/packets/handlers/ChannelUpdate.js +11 -0
  79. package/src/client/websocket/packets/handlers/GuildBanAdd.js +23 -0
  80. package/src/client/websocket/packets/handlers/GuildBanRemove.js +20 -0
  81. package/src/client/websocket/packets/handlers/GuildCreate.js +22 -0
  82. package/src/client/websocket/packets/handlers/GuildDelete.js +19 -0
  83. package/src/client/websocket/packets/handlers/GuildEmojisUpdate.js +11 -0
  84. package/src/client/websocket/packets/handlers/GuildIntegrationsUpdate.js +19 -0
  85. package/src/client/websocket/packets/handlers/GuildMemberAdd.js +17 -0
  86. package/src/client/websocket/packets/handlers/GuildMemberRemove.js +13 -0
  87. package/src/client/websocket/packets/handlers/GuildMemberUpdate.js +18 -0
  88. package/src/client/websocket/packets/handlers/GuildMembersChunk.js +33 -0
  89. package/src/client/websocket/packets/handlers/GuildRoleCreate.js +11 -0
  90. package/src/client/websocket/packets/handlers/GuildRoleDelete.js +11 -0
  91. package/src/client/websocket/packets/handlers/GuildRoleUpdate.js +11 -0
  92. package/src/client/websocket/packets/handlers/GuildSync.js +11 -0
  93. package/src/client/websocket/packets/handlers/GuildUpdate.js +11 -0
  94. package/src/client/websocket/packets/handlers/InviteCreate.js +11 -0
  95. package/src/client/websocket/packets/handlers/InviteDelete.js +11 -0
  96. package/src/client/websocket/packets/handlers/MessageCreate.js +19 -0
  97. package/src/client/websocket/packets/handlers/MessageDelete.js +19 -0
  98. package/src/client/websocket/packets/handlers/MessageDeleteBulk.js +17 -0
  99. package/src/client/websocket/packets/handlers/MessageReactionAdd.js +11 -0
  100. package/src/client/websocket/packets/handlers/MessageReactionRemove.js +11 -0
  101. package/src/client/websocket/packets/handlers/MessageReactionRemoveAll.js +11 -0
  102. package/src/client/websocket/packets/handlers/MessageReactionRemoveEmoji.js +11 -0
  103. package/src/client/websocket/packets/handlers/MessageUpdate.js +11 -0
  104. package/src/client/websocket/packets/handlers/PresenceUpdate.js +76 -0
  105. package/src/client/websocket/packets/handlers/Ready.js +84 -0
  106. package/src/client/websocket/packets/handlers/RelationshipAdd.js +19 -0
  107. package/src/client/websocket/packets/handlers/RelationshipRemove.js +19 -0
  108. package/src/client/websocket/packets/handlers/Resumed.js +26 -0
  109. package/src/client/websocket/packets/handlers/TypingStart.js +68 -0
  110. package/src/client/websocket/packets/handlers/UserGuildSettingsUpdate.js +21 -0
  111. package/src/client/websocket/packets/handlers/UserNoteUpdate.js +12 -0
  112. package/src/client/websocket/packets/handlers/UserSettingsUpdate.js +18 -0
  113. package/src/client/websocket/packets/handlers/UserUpdate.js +11 -0
  114. package/src/client/websocket/packets/handlers/VoiceServerUpdate.js +19 -0
  115. package/src/client/websocket/packets/handlers/VoiceStateUpdate.js +53 -0
  116. package/src/client/websocket/packets/handlers/WebhooksUpdate.js +19 -0
  117. package/src/index.js +71 -0
  118. package/src/sharding/Shard.js +282 -0
  119. package/src/sharding/ShardClientUtil.js +146 -0
  120. package/src/sharding/ShardingManager.js +220 -0
  121. package/src/structures/Attachment.js +75 -0
  122. package/src/structures/CategoryChannel.js +22 -0
  123. package/src/structures/Channel.js +78 -0
  124. package/src/structures/ClientUser.js +447 -0
  125. package/src/structures/ClientUserChannelOverride.js +30 -0
  126. package/src/structures/ClientUserGuildSettings.js +60 -0
  127. package/src/structures/ClientUserSettings.js +80 -0
  128. package/src/structures/DMChannel.js +76 -0
  129. package/src/structures/Emoji.js +273 -0
  130. package/src/structures/GroupDMChannel.js +246 -0
  131. package/src/structures/Guild.js +1711 -0
  132. package/src/structures/GuildAuditLogs.js +462 -0
  133. package/src/structures/GuildChannel.js +601 -0
  134. package/src/structures/GuildMember.js +636 -0
  135. package/src/structures/Integration.js +151 -0
  136. package/src/structures/Invite.js +164 -0
  137. package/src/structures/Message.js +661 -0
  138. package/src/structures/MessageAttachment.js +79 -0
  139. package/src/structures/MessageCollector.js +97 -0
  140. package/src/structures/MessageEmbed.js +386 -0
  141. package/src/structures/MessageMentions.js +185 -0
  142. package/src/structures/MessageReaction.js +107 -0
  143. package/src/structures/NewsChannel.js +24 -0
  144. package/src/structures/OAuth2Application.js +157 -0
  145. package/src/structures/PartialGuild.js +51 -0
  146. package/src/structures/PartialGuildChannel.js +44 -0
  147. package/src/structures/PermissionOverwrites.js +69 -0
  148. package/src/structures/Presence.js +301 -0
  149. package/src/structures/ReactionCollector.js +89 -0
  150. package/src/structures/ReactionEmoji.js +98 -0
  151. package/src/structures/RichEmbed.js +331 -0
  152. package/src/structures/Role.js +376 -0
  153. package/src/structures/StoreChannel.js +25 -0
  154. package/src/structures/Team.js +109 -0
  155. package/src/structures/TeamMember.js +67 -0
  156. package/src/structures/TextChannel.js +154 -0
  157. package/src/structures/User.js +336 -0
  158. package/src/structures/UserConnection.js +48 -0
  159. package/src/structures/UserProfile.js +62 -0
  160. package/src/structures/VoiceChannel.js +146 -0
  161. package/src/structures/VoiceRegion.js +50 -0
  162. package/src/structures/Webhook.js +377 -0
  163. package/src/structures/interfaces/Collector.js +208 -0
  164. package/src/structures/interfaces/TextBasedChannel.js +635 -0
  165. package/src/structures/shared/resolvePermissions.js +26 -0
  166. package/src/util/BitField.js +160 -0
  167. package/src/util/Collection.js +532 -0
  168. package/src/util/Constants.js +943 -0
  169. package/src/util/MessageFlags.js +36 -0
  170. package/src/util/Permissions.js +234 -0
  171. package/src/util/Snowflake.js +82 -0
  172. package/src/util/SystemChannelFlags.js +31 -0
  173. package/src/util/Util.js +238 -0
  174. package/typings/discord.js-test.ts +69 -0
  175. package/typings/index.d.ts +2440 -0
package/.tern-project ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "ecmaVersion": 7,
3
+ "libs": [],
4
+ "loadEagerly": [
5
+ "./src/*.js"
6
+ ],
7
+ "dontLoad": [
8
+ "node_modules/**"
9
+ ],
10
+ "plugins": {
11
+ "es_modules": {},
12
+ "node": {},
13
+ "doc_comment": {
14
+ "fullDocs": true,
15
+ "strong": true
16
+ },
17
+ "webpack": {
18
+ "configPath": "./webpack.config.js",
19
+ }
20
+ }
21
+ }
package/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2017 Amish Shah
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/README.md CHANGED
@@ -1,5 +1,86 @@
1
- # Security holding package
1
+ <div align="center">
2
+ <br />
3
+ <p>
4
+ <a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
5
+ </p>
6
+ <br />
7
+ <p>
8
+ <a href="https://discord.gg/bRCvFy9"><img src="https://discordapp.com/api/guilds/222078108977594368/embed.png" 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?maxAge=3600" 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?maxAge=3600" alt="NPM downloads" /></a>
11
+ <a href="https://travis-ci.org/discordjs/discord.js"><img src="https://travis-ci.org/discordjs/discord.js.svg" alt="Build status" /></a>
12
+ <a href="https://david-dm.org/discordjs/discord.js"><img src="https://img.shields.io/david/discordjs/discord.js.svg?maxAge=3600" alt="Dependencies" /></a>
13
+ </p>
14
+ <p>
15
+ <a href="https://nodei.co/npm/discord.js/"><img src="https://nodei.co/npm/discord.js.png?downloads=true&stars=true" alt="NPM info" /></a>
16
+ </p>
17
+ </div>
2
18
 
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
19
+ ## About
20
+ discord.js is a powerful [node.js](https://nodejs.org) module that allows you to interact with the
21
+ [Discord API](https://discordapp.com/developers/docs/intro) very easily.
4
22
 
5
- Please refer to www.npmjs.com/advisories?search=discord.js-selfbot-v15 for more information.
23
+ - Object-oriented
24
+ - Predictable abstractions
25
+ - Performant
26
+ - 100% coverage of the Discord API
27
+
28
+ ## Installation
29
+ **Node.js 6.0.0 or newer is required.**
30
+ Ignore any warnings about unmet peer dependencies, as they're all optional.
31
+
32
+ Without voice support: `npm install discord.js`
33
+ With voice support ([@discordjs/opus](https://www.npmjs.com/package/@discordjs/opus)): `npm install discord.js @discordjs/opus`
34
+ With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript`
35
+
36
+ ### Audio engines
37
+ The preferred audio engine is @discordjs/opus, as it performs significantly better than opusscript. When both are available, discord.js will automatically choose @discordjs/opus.
38
+ Using opusscript is only recommended for development environments where @discordjs/opus is tough to get working.
39
+ For production bots, using @discordjs/opus should be considered a necessity, especially if they're going to be running on multiple servers.
40
+
41
+ ### Optional packages
42
+ - [bufferutil](https://www.npmjs.com/package/bufferutil) to greatly speed up the WebSocket when *not* using uws (`npm install bufferutil`)
43
+ - [erlpack](https://github.com/hammerandchisel/erlpack) for significantly faster WebSocket data (de)serialisation (`npm install hammerandchisel/erlpack`)
44
+ - One of the following packages can be installed for faster voice packet encryption and decryption:
45
+ - [sodium](https://www.npmjs.com/package/sodium) (`npm install sodium`)
46
+ - [libsodium.js](https://www.npmjs.com/package/libsodium-wrappers) (`npm install libsodium-wrappers`)
47
+
48
+ ## Example usage
49
+ ```js
50
+ const Discord = require('discord.js');
51
+ const client = new Discord.Client();
52
+
53
+ client.on('ready', () => {
54
+ console.log(`Logged in as ${client.user.tag}!`);
55
+ });
56
+
57
+ client.on('message', msg => {
58
+ if (msg.content === 'ping') {
59
+ msg.reply('pong');
60
+ }
61
+ });
62
+
63
+ client.login('token');
64
+ ```
65
+
66
+ ## Links
67
+ * [Website](https://discord.js.org/) ([source](https://github.com/discordjs/website))
68
+ * [Documentation](https://discord.js.org/#/docs)
69
+ * [Guide](https://discordjs.guide/) ([source](https://github.com/discordjs/guide))
70
+ * [Discord.js Discord server](https://discord.gg/bRCvFy9)
71
+ * [Discord API Discord server](https://discord.gg/discord-api)
72
+ * [GitHub](https://github.com/discordjs/discord.js)
73
+ * [NPM](https://www.npmjs.com/package/discord.js)
74
+ * [Related libraries](https://discordapi.com/unofficial/libs.html)
75
+
76
+ ### Extensions
77
+ * [RPC](https://www.npmjs.com/package/discord-rpc) ([source](https://github.com/discordjs/RPC))
78
+
79
+ ## Contributing
80
+ Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
81
+ [documentation](https://discord.js.org/#/docs).
82
+ See [the contribution guide](https://github.com/discordjs/discord.js/blob/master/.github/CONTRIBUTING.md) if you'd like to submit a PR.
83
+
84
+ ## Help
85
+ If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle
86
+ nudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).
package/browser.js ADDED
@@ -0,0 +1,9 @@
1
+ const browser = typeof window !== 'undefined';
2
+ const webpack = !!process.env.__DISCORD_WEBPACK__;
3
+
4
+ const Discord = require('./');
5
+
6
+ module.exports = Discord;
7
+ if (browser && webpack) window.Discord = Discord; // eslint-disable-line no-undef
8
+ // eslint-disable-next-line no-console
9
+ else if (!browser) console.warn('Warning: Attempting to use browser version of Discord.js in a non-browser environment!');
package/package.json CHANGED
@@ -1,6 +1,128 @@
1
1
  {
2
2
  "name": "discord.js-selfbot-v15",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "11.6.4",
4
+ "description": "A powerful library for interacting with the Discord API",
5
+ "main": "./src/index",
6
+ "types": "./typings/index.d.ts",
7
+ "scripts": {
8
+ "test": "npm run lint && npm run docs:test",
9
+ "docs": "docgen --source src --custom docs/index.yml --output docs/docs.json",
10
+ "docs:test": "docgen --source src --custom docs/index.yml",
11
+ "lint": "eslint src",
12
+ "lint:fix": "eslint --fix src",
13
+ "lint:typings": "tslint typings/index.d.ts typings/discord.js-test.ts",
14
+ "webpack": "parallel-webpack"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/discordjs/discord.js.git"
19
+ },
20
+ "keywords": [
21
+ "discord",
22
+ "api",
23
+ "bot",
24
+ "client",
25
+ "node",
26
+ "discordapp"
27
+ ],
28
+ "author": "Amish Shah <amishshah.2k@gmail.com>",
29
+ "license": "Apache-2.0",
30
+ "bugs": {
31
+ "url": "https://github.com/discordjs/discord.js/issues"
32
+ },
33
+ "homepage": "https://github.com/discordjs/discord.js#readme",
34
+ "runkitExampleFilename": "./docs/examples/ping.js",
35
+ "dependencies": {
36
+ "long": "^4.0.0",
37
+ "prism-media": "^0.0.4",
38
+ "discord.js-request": "2.0.0",
39
+ "snekfetch": "^3.6.4",
40
+ "tweetnacl": "^1.0.0",
41
+ "ws": "^6.0.0"
42
+ },
43
+ "peerDependencies": {
44
+ "@discordjs/uws": "^10.149.0",
45
+ "bufferutil": "^4.0.0",
46
+ "erlpack": "discordapp/erlpack",
47
+ "libsodium-wrappers": "^0.7.3",
48
+ "@discordjs/opus": "^0.1.0",
49
+ "node-opus": "^0.2.7",
50
+ "opusscript": "^0.0.6",
51
+ "sodium": "^2.0.3"
52
+ },
53
+ "peerDependenciesMeta": {
54
+ "bufferutil": {
55
+ "optional": true
56
+ },
57
+ "erlpack": {
58
+ "optional": true
59
+ },
60
+ "@discordjs/opus": {
61
+ "optional": true
62
+ },
63
+ "node-opus": {
64
+ "optional": true
65
+ },
66
+ "opusscript": {
67
+ "optional": true
68
+ },
69
+ "sodium": {
70
+ "optional": true
71
+ },
72
+ "libsodium-wrappers": {
73
+ "optional": true
74
+ },
75
+ "uws": {
76
+ "optional": true
77
+ }
78
+ },
79
+ "devDependencies": {
80
+ "@types/node": "^9.4.6",
81
+ "discord.js-docgen": "discordjs/docgen",
82
+ "eslint": "^5.4.0",
83
+ "parallel-webpack": "^2.3.0",
84
+ "tslint": "^3.15.1",
85
+ "tslint-config-typings": "^0.2.4",
86
+ "typescript": "^3.0.1",
87
+ "uglifyjs-webpack-plugin": "^1.3.0",
88
+ "webpack": "^4.17.0"
89
+ },
90
+ "engines": {
91
+ "node": ">=6.0.0"
92
+ },
93
+ "browser": {
94
+ "ws": false,
95
+ "uws": false,
96
+ "@discordjs/uws": false,
97
+ "erlpack": false,
98
+ "prism-media": false,
99
+ "opusscript": false,
100
+ "node-opus": false,
101
+ "@discordjs/opus": false,
102
+ "tweetnacl": false,
103
+ "sodium": false,
104
+ "src/sharding/Shard.js": false,
105
+ "src/sharding/ShardClientUtil.js": false,
106
+ "src/sharding/ShardingManager.js": false,
107
+ "src/client/voice/dispatcher/StreamDispatcher.js": false,
108
+ "src/client/voice/opus/BaseOpusEngine.js": false,
109
+ "src/client/voice/opus/NodeOpusEngine.js": false,
110
+ "src/client/voice/opus/DiscordJsOpusEngine.js": false,
111
+ "src/client/voice/opus/OpusEngineList.js": false,
112
+ "src/client/voice/opus/OpusScriptEngine.js": false,
113
+ "src/client/voice/pcm/ConverterEngine.js": false,
114
+ "src/client/voice/pcm/ConverterEngineList.js": false,
115
+ "src/client/voice/pcm/FfmpegConverterEngine.js": false,
116
+ "src/client/voice/player/AudioPlayer.js": false,
117
+ "src/client/voice/receiver/VoiceReadable.js": false,
118
+ "src/client/voice/receiver/VoiceReceiver.js": false,
119
+ "src/client/voice/util/Secretbox.js": false,
120
+ "src/client/voice/util/SecretKey.js": false,
121
+ "src/client/voice/util/VolumeInterface.js": false,
122
+ "src/client/voice/ClientVoiceManager.js": false,
123
+ "src/client/voice/VoiceBroadcast.js": false,
124
+ "src/client/voice/VoiceConnection.js": false,
125
+ "src/client/voice/VoiceUDPClient.js": false,
126
+ "src/client/voice/VoiceWebSocket.js": false
127
+ }
6
128
  }