discord.js 15.0.0-dev.1737057471-3f83f5f51 → 15.0.0-dev.1737201865-c6e16c367

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 (288) hide show
  1. package/package.json +4 -4
  2. package/src/client/BaseClient.js +2 -2
  3. package/src/client/Client.js +24 -24
  4. package/src/client/WebhookClient.js +3 -3
  5. package/src/client/actions/Action.js +3 -3
  6. package/src/client/actions/ActionsManager.js +40 -42
  7. package/src/client/actions/ChannelCreate.js +3 -3
  8. package/src/client/actions/ChannelDelete.js +3 -3
  9. package/src/client/actions/ChannelUpdate.js +2 -2
  10. package/src/client/actions/GuildChannelsPositionUpdate.js +3 -3
  11. package/src/client/actions/GuildEmojiCreate.js +3 -3
  12. package/src/client/actions/GuildEmojiDelete.js +3 -3
  13. package/src/client/actions/GuildEmojiUpdate.js +3 -3
  14. package/src/client/actions/GuildEmojisUpdate.js +2 -2
  15. package/src/client/actions/GuildMemberRemove.js +3 -3
  16. package/src/client/actions/GuildMemberUpdate.js +3 -3
  17. package/src/client/actions/GuildRoleCreate.js +4 -4
  18. package/src/client/actions/GuildRoleDelete.js +3 -3
  19. package/src/client/actions/GuildRolesPositionUpdate.js +3 -3
  20. package/src/client/actions/GuildScheduledEventDelete.js +3 -3
  21. package/src/client/actions/GuildScheduledEventUserAdd.js +3 -3
  22. package/src/client/actions/GuildScheduledEventUserRemove.js +3 -3
  23. package/src/client/actions/GuildStickerCreate.js +3 -3
  24. package/src/client/actions/GuildStickerDelete.js +3 -3
  25. package/src/client/actions/GuildStickerUpdate.js +3 -3
  26. package/src/client/actions/GuildStickersUpdate.js +2 -2
  27. package/src/client/actions/GuildUpdate.js +3 -3
  28. package/src/client/actions/InteractionCreate.js +14 -14
  29. package/src/client/actions/MessageCreate.js +3 -3
  30. package/src/client/actions/MessageDelete.js +3 -3
  31. package/src/client/actions/MessageDeleteBulk.js +3 -3
  32. package/src/client/actions/MessagePollVoteAdd.js +3 -3
  33. package/src/client/actions/MessagePollVoteRemove.js +3 -3
  34. package/src/client/actions/MessageReactionAdd.js +5 -5
  35. package/src/client/actions/MessageReactionRemove.js +4 -4
  36. package/src/client/actions/MessageReactionRemoveAll.js +4 -4
  37. package/src/client/actions/MessageReactionRemoveEmoji.js +4 -4
  38. package/src/client/actions/MessageUpdate.js +2 -2
  39. package/src/client/actions/StageInstanceCreate.js +3 -3
  40. package/src/client/actions/StageInstanceDelete.js +3 -3
  41. package/src/client/actions/StageInstanceUpdate.js +3 -3
  42. package/src/client/actions/ThreadCreate.js +3 -3
  43. package/src/client/actions/ThreadMembersUpdate.js +3 -3
  44. package/src/client/actions/TypingStart.js +5 -5
  45. package/src/client/actions/UserUpdate.js +3 -3
  46. package/src/client/voice/ClientVoiceManager.js +1 -1
  47. package/src/client/websocket/handlers/APPLICATION_COMMAND_PERMISSIONS_UPDATE.js +1 -1
  48. package/src/client/websocket/handlers/AUTO_MODERATION_ACTION_EXECUTION.js +2 -2
  49. package/src/client/websocket/handlers/AUTO_MODERATION_RULE_CREATE.js +1 -1
  50. package/src/client/websocket/handlers/AUTO_MODERATION_RULE_DELETE.js +1 -1
  51. package/src/client/websocket/handlers/AUTO_MODERATION_RULE_UPDATE.js +1 -1
  52. package/src/client/websocket/handlers/CHANNEL_PINS_UPDATE.js +1 -1
  53. package/src/client/websocket/handlers/CHANNEL_UPDATE.js +1 -1
  54. package/src/client/websocket/handlers/ENTITLEMENT_CREATE.js +1 -1
  55. package/src/client/websocket/handlers/ENTITLEMENT_DELETE.js +1 -1
  56. package/src/client/websocket/handlers/ENTITLEMENT_UPDATE.js +1 -1
  57. package/src/client/websocket/handlers/GUILD_AUDIT_LOG_ENTRY_CREATE.js +2 -2
  58. package/src/client/websocket/handlers/GUILD_BAN_ADD.js +1 -1
  59. package/src/client/websocket/handlers/GUILD_BAN_REMOVE.js +2 -2
  60. package/src/client/websocket/handlers/GUILD_CREATE.js +2 -2
  61. package/src/client/websocket/handlers/GUILD_DELETE.js +1 -1
  62. package/src/client/websocket/handlers/GUILD_INTEGRATIONS_UPDATE.js +1 -1
  63. package/src/client/websocket/handlers/GUILD_MEMBERS_CHUNK.js +1 -1
  64. package/src/client/websocket/handlers/GUILD_MEMBER_ADD.js +1 -1
  65. package/src/client/websocket/handlers/GUILD_ROLE_UPDATE.js +1 -1
  66. package/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_CREATE.js +1 -1
  67. package/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_UPDATE.js +1 -1
  68. package/src/client/websocket/handlers/INVITE_CREATE.js +1 -1
  69. package/src/client/websocket/handlers/INVITE_DELETE.js +2 -2
  70. package/src/client/websocket/handlers/MESSAGE_UPDATE.js +1 -1
  71. package/src/client/websocket/handlers/PRESENCE_UPDATE.js +2 -2
  72. package/src/client/websocket/handlers/READY.js +2 -2
  73. package/src/client/websocket/handlers/SUBSCRIPTION_CREATE.js +1 -1
  74. package/src/client/websocket/handlers/SUBSCRIPTION_DELETE.js +1 -1
  75. package/src/client/websocket/handlers/SUBSCRIPTION_UPDATE.js +1 -1
  76. package/src/client/websocket/handlers/THREAD_DELETE.js +1 -1
  77. package/src/client/websocket/handlers/THREAD_LIST_SYNC.js +1 -1
  78. package/src/client/websocket/handlers/THREAD_MEMBER_UPDATE.js +1 -1
  79. package/src/client/websocket/handlers/THREAD_UPDATE.js +1 -1
  80. package/src/client/websocket/handlers/VOICE_CHANNEL_EFFECT_SEND.js +2 -2
  81. package/src/client/websocket/handlers/VOICE_STATE_UPDATE.js +2 -2
  82. package/src/client/websocket/handlers/WEBHOOKS_UPDATE.js +1 -1
  83. package/src/client/websocket/handlers/index.js +2 -2
  84. package/src/errors/DJSError.js +7 -5
  85. package/src/errors/ErrorCodes.js +1 -3
  86. package/src/errors/Messages.js +106 -105
  87. package/src/errors/index.js +3 -5
  88. package/src/index.js +171 -187
  89. package/src/managers/ApplicationCommandManager.js +5 -5
  90. package/src/managers/ApplicationCommandPermissionsManager.js +2 -2
  91. package/src/managers/ApplicationEmojiManager.js +3 -3
  92. package/src/managers/AutoModerationRuleManager.js +3 -3
  93. package/src/managers/BaseGuildEmojiManager.js +5 -5
  94. package/src/managers/BaseManager.js +1 -1
  95. package/src/managers/CachedManager.js +2 -2
  96. package/src/managers/CategoryChannelChildManager.js +3 -3
  97. package/src/managers/ChannelManager.js +3 -3
  98. package/src/managers/DMMessageManager.js +2 -2
  99. package/src/managers/DataManager.js +2 -2
  100. package/src/managers/EntitlementManager.js +1 -1
  101. package/src/managers/GuildApplicationCommandManager.js +3 -3
  102. package/src/managers/GuildBanManager.js +3 -3
  103. package/src/managers/GuildChannelManager.js +8 -8
  104. package/src/managers/GuildEmojiManager.js +2 -2
  105. package/src/managers/GuildEmojiRoleManager.js +2 -2
  106. package/src/managers/GuildForumThreadManager.js +3 -3
  107. package/src/managers/GuildInviteManager.js +3 -3
  108. package/src/managers/GuildManager.js +10 -10
  109. package/src/managers/GuildMemberManager.js +5 -5
  110. package/src/managers/GuildMemberRoleManager.js +2 -2
  111. package/src/managers/GuildMessageManager.js +2 -2
  112. package/src/managers/GuildScheduledEventManager.js +2 -2
  113. package/src/managers/GuildStickerManager.js +3 -3
  114. package/src/managers/GuildTextThreadManager.js +2 -2
  115. package/src/managers/MessageManager.js +3 -3
  116. package/src/managers/PartialGroupDMMessageManager.js +2 -2
  117. package/src/managers/PermissionOverwriteManager.js +3 -3
  118. package/src/managers/PresenceManager.js +2 -2
  119. package/src/managers/ReactionManager.js +3 -3
  120. package/src/managers/ReactionUserManager.js +3 -3
  121. package/src/managers/RoleManager.js +3 -3
  122. package/src/managers/StageInstanceManager.js +2 -2
  123. package/src/managers/SubscriptionManager.js +1 -1
  124. package/src/managers/ThreadManager.js +3 -3
  125. package/src/managers/ThreadMemberManager.js +3 -3
  126. package/src/managers/UserManager.js +4 -4
  127. package/src/managers/VoiceStateManager.js +3 -3
  128. package/src/sharding/Shard.js +2 -2
  129. package/src/sharding/ShardClientUtil.js +2 -2
  130. package/src/sharding/ShardingManager.js +2 -2
  131. package/src/structures/ActionRow.js +2 -2
  132. package/src/structures/ActionRowBuilder.js +3 -4
  133. package/src/structures/AnnouncementChannel.js +2 -2
  134. package/src/structures/AnonymousGuild.js +2 -2
  135. package/src/structures/ApplicationCommand.js +4 -4
  136. package/src/structures/ApplicationEmoji.js +1 -1
  137. package/src/structures/Attachment.js +2 -2
  138. package/src/structures/AttachmentBuilder.js +1 -1
  139. package/src/structures/AutoModerationActionExecution.js +1 -1
  140. package/src/structures/AutoModerationRule.js +2 -2
  141. package/src/structures/AutocompleteInteraction.js +3 -3
  142. package/src/structures/Base.js +1 -1
  143. package/src/structures/BaseChannel.js +2 -2
  144. package/src/structures/BaseGuild.js +2 -2
  145. package/src/structures/BaseGuildEmoji.js +1 -1
  146. package/src/structures/BaseGuildTextChannel.js +5 -5
  147. package/src/structures/BaseGuildVoiceChannel.js +4 -4
  148. package/src/structures/BaseInteraction.js +3 -3
  149. package/src/structures/BaseSelectMenuComponent.js +2 -2
  150. package/src/structures/ButtonBuilder.js +1 -1
  151. package/src/structures/ButtonComponent.js +2 -2
  152. package/src/structures/ButtonInteraction.js +2 -2
  153. package/src/structures/CategoryChannel.js +3 -3
  154. package/src/structures/ChannelSelectMenuBuilder.js +1 -1
  155. package/src/structures/ChannelSelectMenuComponent.js +2 -2
  156. package/src/structures/ChannelSelectMenuInteraction.js +2 -2
  157. package/src/structures/ChatInputCommandInteraction.js +3 -3
  158. package/src/structures/ClientApplication.js +7 -7
  159. package/src/structures/ClientPresence.js +1 -1
  160. package/src/structures/ClientUser.js +2 -2
  161. package/src/structures/CommandInteraction.js +5 -5
  162. package/src/structures/CommandInteractionOptionResolver.js +1 -1
  163. package/src/structures/Component.js +1 -1
  164. package/src/structures/ContextMenuCommandInteraction.js +3 -3
  165. package/src/structures/DMChannel.js +4 -4
  166. package/src/structures/DirectoryChannel.js +1 -1
  167. package/src/structures/Embed.js +1 -1
  168. package/src/structures/EmbedBuilder.js +1 -1
  169. package/src/structures/Emoji.js +1 -1
  170. package/src/structures/Entitlement.js +1 -1
  171. package/src/structures/ForumChannel.js +2 -2
  172. package/src/structures/Guild.js +21 -21
  173. package/src/structures/GuildAuditLogs.js +5 -5
  174. package/src/structures/GuildAuditLogsEntry.js +6 -6
  175. package/src/structures/GuildBan.js +2 -2
  176. package/src/structures/GuildChannel.js +3 -3
  177. package/src/structures/GuildEmoji.js +3 -3
  178. package/src/structures/GuildMember.js +5 -5
  179. package/src/structures/GuildOnboarding.js +1 -1
  180. package/src/structures/GuildOnboardingPrompt.js +1 -1
  181. package/src/structures/GuildOnboardingPromptOption.js +1 -1
  182. package/src/structures/GuildPreview.js +3 -3
  183. package/src/structures/GuildPreviewEmoji.js +2 -2
  184. package/src/structures/GuildScheduledEvent.js +1 -1
  185. package/src/structures/GuildTemplate.js +3 -3
  186. package/src/structures/Integration.js +3 -3
  187. package/src/structures/IntegrationApplication.js +2 -2
  188. package/src/structures/InteractionCallback.js +1 -1
  189. package/src/structures/InteractionCallbackResource.js +1 -1
  190. package/src/structures/InteractionCallbackResponse.js +3 -3
  191. package/src/structures/InteractionCollector.js +3 -3
  192. package/src/structures/InteractionWebhook.js +2 -2
  193. package/src/structures/Invite.js +4 -4
  194. package/src/structures/InviteGuild.js +3 -3
  195. package/src/structures/MediaChannel.js +2 -2
  196. package/src/structures/MentionableSelectMenuBuilder.js +1 -1
  197. package/src/structures/MentionableSelectMenuComponent.js +2 -2
  198. package/src/structures/MentionableSelectMenuInteraction.js +3 -3
  199. package/src/structures/Message.js +13 -13
  200. package/src/structures/MessageCollector.js +3 -3
  201. package/src/structures/MessageComponentInteraction.js +4 -4
  202. package/src/structures/MessageContextMenuCommandInteraction.js +2 -2
  203. package/src/structures/MessageMentions.js +1 -1
  204. package/src/structures/MessagePayload.js +7 -7
  205. package/src/structures/MessageReaction.js +5 -5
  206. package/src/structures/ModalBuilder.js +1 -1
  207. package/src/structures/ModalSubmitFields.js +1 -1
  208. package/src/structures/ModalSubmitInteraction.js +5 -5
  209. package/src/structures/OAuth2Guild.js +3 -3
  210. package/src/structures/PartialGroupDMChannel.js +3 -3
  211. package/src/structures/PermissionOverwrites.js +3 -3
  212. package/src/structures/Poll.js +1 -1
  213. package/src/structures/PollAnswer.js +1 -1
  214. package/src/structures/Presence.js +2 -2
  215. package/src/structures/ReactionCollector.js +3 -3
  216. package/src/structures/ReactionEmoji.js +1 -1
  217. package/src/structures/Role.js +3 -3
  218. package/src/structures/RoleSelectMenuBuilder.js +1 -1
  219. package/src/structures/RoleSelectMenuComponent.js +2 -2
  220. package/src/structures/RoleSelectMenuInteraction.js +2 -2
  221. package/src/structures/SKU.js +1 -1
  222. package/src/structures/StageChannel.js +2 -2
  223. package/src/structures/StageInstance.js +1 -1
  224. package/src/structures/Sticker.js +1 -1
  225. package/src/structures/StickerPack.js +2 -2
  226. package/src/structures/StringSelectMenuBuilder.js +1 -1
  227. package/src/structures/StringSelectMenuComponent.js +2 -2
  228. package/src/structures/StringSelectMenuInteraction.js +2 -2
  229. package/src/structures/StringSelectMenuOptionBuilder.js +1 -1
  230. package/src/structures/Subscription.js +1 -1
  231. package/src/structures/Team.js +3 -3
  232. package/src/structures/TeamMember.js +2 -2
  233. package/src/structures/TextChannel.js +2 -2
  234. package/src/structures/TextInputBuilder.js +1 -1
  235. package/src/structures/TextInputComponent.js +2 -2
  236. package/src/structures/ThreadChannel.js +5 -5
  237. package/src/structures/ThreadMember.js +3 -3
  238. package/src/structures/ThreadOnlyChannel.js +4 -4
  239. package/src/structures/Typing.js +2 -2
  240. package/src/structures/User.js +4 -4
  241. package/src/structures/UserContextMenuCommandInteraction.js +2 -2
  242. package/src/structures/UserSelectMenuBuilder.js +1 -1
  243. package/src/structures/UserSelectMenuComponent.js +2 -2
  244. package/src/structures/UserSelectMenuInteraction.js +3 -3
  245. package/src/structures/VoiceChannel.js +2 -2
  246. package/src/structures/VoiceChannelEffect.js +1 -1
  247. package/src/structures/VoiceRegion.js +1 -1
  248. package/src/structures/VoiceState.js +2 -2
  249. package/src/structures/Webhook.js +2 -2
  250. package/src/structures/WelcomeChannel.js +2 -2
  251. package/src/structures/WelcomeScreen.js +3 -3
  252. package/src/structures/Widget.js +3 -3
  253. package/src/structures/WidgetMember.js +2 -2
  254. package/src/structures/interfaces/Application.js +2 -2
  255. package/src/structures/interfaces/Collector.js +1 -1
  256. package/src/structures/interfaces/InteractionResponses.js +5 -5
  257. package/src/structures/interfaces/TextBasedChannel.js +6 -6
  258. package/src/util/ActivityFlagsBitField.js +2 -2
  259. package/src/util/ApplicationFlagsBitField.js +2 -2
  260. package/src/util/AttachmentFlagsBitField.js +2 -2
  261. package/src/util/BitField.js +1 -1
  262. package/src/util/ChannelFlagsBitField.js +2 -2
  263. package/src/util/Channels.js +18 -16
  264. package/src/util/Colors.js +43 -43
  265. package/src/util/Components.js +19 -20
  266. package/src/util/DataResolver.js +3 -8
  267. package/src/util/Enums.js +1 -1
  268. package/src/util/Events.js +3 -3
  269. package/src/util/GuildMemberFlagsBitField.js +1 -1
  270. package/src/util/IntentsBitField.js +2 -2
  271. package/src/util/LimitedCollection.js +1 -1
  272. package/src/util/MessageFlagsBitField.js +2 -2
  273. package/src/util/Options.js +2 -2
  274. package/src/util/Partials.js +1 -1
  275. package/src/util/PermissionsBitField.js +2 -2
  276. package/src/util/RoleFlagsBitField.js +2 -2
  277. package/src/util/SKUFlagsBitField.js +1 -1
  278. package/src/util/ShardEvents.js +1 -1
  279. package/src/util/Status.js +1 -1
  280. package/src/util/Sweepers.js +2 -2
  281. package/src/util/SystemChannelFlagsBitField.js +2 -2
  282. package/src/util/ThreadMemberFlagsBitField.js +2 -2
  283. package/src/util/Transformers.js +6 -4
  284. package/src/util/UserFlagsBitField.js +2 -2
  285. package/src/util/Util.js +23 -21
  286. package/typings/index.d.mts +1 -0
  287. package/typings/index.d.ts +1 -0
  288. package/typings/index.test-d.ts +11 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "discord.js",
4
- "version": "15.0.0-dev.1737057471-3f83f5f51",
4
+ "version": "15.0.0-dev.1737201865-c6e16c367",
5
5
  "description": "A powerful library for interacting with the Discord API",
6
6
  "main": "./src/index.js",
7
7
  "types": "./typings/index.d.ts",
@@ -61,8 +61,8 @@
61
61
  "undici": "6.21.0",
62
62
  "@discordjs/collection": "^2.1.1",
63
63
  "@discordjs/formatters": "^0.5.0",
64
- "@discordjs/util": "^1.1.1",
65
64
  "@discordjs/rest": "^2.4.0",
65
+ "@discordjs/util": "^1.1.1",
66
66
  "@discordjs/ws": "^2.0.0"
67
67
  },
68
68
  "devDependencies": {
@@ -81,8 +81,8 @@
81
81
  "turbo": "^2.3.3",
82
82
  "typescript": "~5.5.4",
83
83
  "@discordjs/api-extractor": "^7.38.1",
84
- "@discordjs/scripts": "^0.1.0",
85
- "@discordjs/docgen": "^0.12.1"
84
+ "@discordjs/docgen": "^0.12.1",
85
+ "@discordjs/scripts": "^0.1.0"
86
86
  },
87
87
  "engines": {
88
88
  "node": ">=20"
@@ -4,7 +4,7 @@ const EventEmitter = require('node:events');
4
4
  const { REST } = require('@discordjs/rest');
5
5
  const { Routes } = require('discord-api-types/v10');
6
6
  const { DiscordjsTypeError, ErrorCodes } = require('../errors');
7
- const { Options } = require('../util/Options');
7
+ const Options = require('../util/Options');
8
8
  const { flatten } = require('../util/Util');
9
9
 
10
10
  /**
@@ -112,7 +112,7 @@ class BaseClient extends EventEmitter {
112
112
  }
113
113
  }
114
114
 
115
- exports.BaseClient = BaseClient;
115
+ module.exports = BaseClient;
116
116
 
117
117
  /**
118
118
  * @external REST
@@ -6,32 +6,32 @@ const { Collection } = require('@discordjs/collection');
6
6
  const { makeURLSearchParams } = require('@discordjs/rest');
7
7
  const { WebSocketManager, WebSocketShardEvents, WebSocketShardStatus } = require('@discordjs/ws');
8
8
  const { GatewayDispatchEvents, GatewayIntentBits, OAuth2Scopes, Routes } = require('discord-api-types/v10');
9
- const { BaseClient } = require('./BaseClient');
10
- const { ActionsManager } = require('./actions/ActionsManager');
11
- const { ClientVoiceManager } = require('./voice/ClientVoiceManager');
12
- const { PacketHandlers } = require('./websocket/handlers');
9
+ const BaseClient = require('./BaseClient');
10
+ const ActionsManager = require('./actions/ActionsManager');
11
+ const ClientVoiceManager = require('./voice/ClientVoiceManager');
12
+ const PacketHandlers = require('./websocket/handlers');
13
13
  const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors');
14
- const { BaseGuildEmojiManager } = require('../managers/BaseGuildEmojiManager');
15
- const { ChannelManager } = require('../managers/ChannelManager');
16
- const { GuildManager } = require('../managers/GuildManager');
17
- const { UserManager } = require('../managers/UserManager');
18
- const { ShardClientUtil } = require('../sharding/ShardClientUtil');
19
- const { ClientPresence } = require('../structures/ClientPresence');
20
- const { GuildPreview } = require('../structures/GuildPreview');
21
- const { GuildTemplate } = require('../structures/GuildTemplate');
22
- const { Invite } = require('../structures/Invite');
14
+ const BaseGuildEmojiManager = require('../managers/BaseGuildEmojiManager');
15
+ const ChannelManager = require('../managers/ChannelManager');
16
+ const GuildManager = require('../managers/GuildManager');
17
+ const UserManager = require('../managers/UserManager');
18
+ const ShardClientUtil = require('../sharding/ShardClientUtil');
19
+ const ClientPresence = require('../structures/ClientPresence');
20
+ const GuildPreview = require('../structures/GuildPreview');
21
+ const GuildTemplate = require('../structures/GuildTemplate');
22
+ const Invite = require('../structures/Invite');
23
23
  const { Sticker } = require('../structures/Sticker');
24
- const { StickerPack } = require('../structures/StickerPack');
25
- const { VoiceRegion } = require('../structures/VoiceRegion');
26
- const { Webhook } = require('../structures/Webhook');
27
- const { Widget } = require('../structures/Widget');
24
+ const StickerPack = require('../structures/StickerPack');
25
+ const VoiceRegion = require('../structures/VoiceRegion');
26
+ const Webhook = require('../structures/Webhook');
27
+ const Widget = require('../structures/Widget');
28
28
  const { resolveInviteCode, resolveGuildTemplateCode } = require('../util/DataResolver');
29
- const { Events } = require('../util/Events');
30
- const { IntentsBitField } = require('../util/IntentsBitField');
31
- const { Options } = require('../util/Options');
32
- const { PermissionsBitField } = require('../util/PermissionsBitField');
33
- const { Status } = require('../util/Status');
34
- const { Sweepers } = require('../util/Sweepers');
29
+ const Events = require('../util/Events');
30
+ const IntentsBitField = require('../util/IntentsBitField');
31
+ const Options = require('../util/Options');
32
+ const PermissionsBitField = require('../util/PermissionsBitField');
33
+ const Status = require('../util/Status');
34
+ const Sweepers = require('../util/Sweepers');
35
35
 
36
36
  const WaitingForGuildEvents = [GatewayDispatchEvents.GuildCreate, GatewayDispatchEvents.GuildDelete];
37
37
  const BeforeReadyWhitelist = [
@@ -732,7 +732,7 @@ class Client extends BaseClient {
732
732
  }
733
733
  }
734
734
 
735
- exports.Client = Client;
735
+ module.exports = Client;
736
736
 
737
737
  /**
738
738
  * @class SnowflakeUtil
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const { BaseClient } = require('./BaseClient');
3
+ const BaseClient = require('./BaseClient');
4
4
  const { DiscordjsError, ErrorCodes } = require('../errors');
5
- const { Webhook } = require('../structures/Webhook');
5
+ const Webhook = require('../structures/Webhook');
6
6
  const { parseWebhookURL } = require('../util/Util');
7
7
 
8
8
  /**
@@ -100,4 +100,4 @@ class WebhookClient extends BaseClient {
100
100
 
101
101
  Webhook.applyToClass(WebhookClient);
102
102
 
103
- exports.WebhookClient = WebhookClient;
103
+ module.exports = WebhookClient;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const { Partials } = require('../../util/Partials');
3
+ const Partials = require('../../util/Partials');
4
4
 
5
5
  /*
6
6
 
@@ -14,7 +14,7 @@ that WebSocket events don't clash with REST methods.
14
14
 
15
15
  */
16
16
 
17
- class Action {
17
+ class GenericAction {
18
18
  constructor(client) {
19
19
  this.client = client;
20
20
  }
@@ -117,4 +117,4 @@ class Action {
117
117
  }
118
118
  }
119
119
 
120
- exports.Action = Action;
120
+ module.exports = GenericAction;
@@ -11,47 +11,45 @@ class ActionsManager {
11
11
  constructor(client) {
12
12
  this.client = client;
13
13
 
14
- this.register(require('./ChannelCreate').ChannelCreateAction);
15
- this.register(require('./ChannelDelete').ChannelDeleteAction);
16
- this.register(require('./ChannelUpdate').ChannelUpdateAction);
17
- this.register(require('./GuildChannelsPositionUpdate').GuildChannelsPositionUpdateAction);
18
- this.register(require('./GuildEmojiCreate').GuildEmojiCreateAction);
19
- this.register(require('./GuildEmojiDelete').GuildEmojiDeleteAction);
20
- this.register(require('./GuildEmojiUpdate').GuildEmojiUpdateAction);
21
- this.register(require('./GuildEmojiUpdate').GuildEmojiUpdateAction);
22
- this.register(require('./GuildEmojisUpdate').GuildEmojisUpdateAction);
23
- this.register(require('./GuildMemberRemove').GuildMemberRemoveAction);
24
- this.register(require('./GuildMemberUpdate').GuildMemberUpdateAction);
25
- this.register(require('./GuildRoleCreate').GuildRoleCreateAction);
26
- this.register(require('./GuildRoleDelete').GuildRoleDeleteAction);
27
- this.register(require('./GuildRolesPositionUpdate').GuildRolesPositionUpdateAction);
28
- this.register(require('./GuildScheduledEventDelete').GuildScheduledEventDeleteAction);
29
- this.register(require('./GuildScheduledEventUserAdd').GuildScheduledEventUserAddAction);
30
- this.register(require('./GuildScheduledEventUserRemove').GuildScheduledEventUserRemoveAction);
31
- this.register(require('./GuildStickerCreate').GuildStickerCreateAction);
32
- this.register(require('./GuildStickerDelete').GuildStickerDeleteAction);
33
- this.register(require('./GuildStickerUpdate').GuildStickerUpdateAction);
34
- this.register(require('./GuildStickerUpdate').GuildStickerUpdateAction);
35
- this.register(require('./GuildStickersUpdate').GuildStickersUpdateAction);
36
- this.register(require('./GuildUpdate').GuildUpdateAction);
37
- this.register(require('./InteractionCreate').InteractionCreateAction);
38
- this.register(require('./MessageCreate').MessageCreateAction);
39
- this.register(require('./MessageDelete').MessageDeleteAction);
40
- this.register(require('./MessageDeleteBulk').MessageDeleteBulkAction);
41
- this.register(require('./MessagePollVoteAdd').MessagePollVoteAddAction);
42
- this.register(require('./MessagePollVoteRemove').MessagePollVoteRemoveAction);
43
- this.register(require('./MessageReactionAdd').MessageReactionAddAction);
44
- this.register(require('./MessageReactionRemove').MessageReactionRemoveAction);
45
- this.register(require('./MessageReactionRemoveAll').MessageReactionRemoveAllAction);
46
- this.register(require('./MessageReactionRemoveEmoji').MessageReactionRemoveEmojiAction);
47
- this.register(require('./MessageUpdate').MessageUpdateAction);
48
- this.register(require('./StageInstanceCreate').StageInstanceCreateAction);
49
- this.register(require('./StageInstanceDelete').StageInstanceDeleteAction);
50
- this.register(require('./StageInstanceUpdate').StageInstanceUpdateAction);
51
- this.register(require('./ThreadCreate').ThreadCreateAction);
52
- this.register(require('./ThreadMembersUpdate').ThreadMembersUpdateAction);
53
- this.register(require('./TypingStart').TypingStartAction);
54
- this.register(require('./UserUpdate').UserUpdateAction);
14
+ this.register(require('./ChannelCreate'));
15
+ this.register(require('./ChannelDelete'));
16
+ this.register(require('./ChannelUpdate'));
17
+ this.register(require('./GuildChannelsPositionUpdate'));
18
+ this.register(require('./GuildEmojiCreate'));
19
+ this.register(require('./GuildEmojiDelete'));
20
+ this.register(require('./GuildEmojiUpdate'));
21
+ this.register(require('./GuildEmojisUpdate'));
22
+ this.register(require('./GuildMemberRemove'));
23
+ this.register(require('./GuildMemberUpdate'));
24
+ this.register(require('./GuildRoleCreate'));
25
+ this.register(require('./GuildRoleDelete'));
26
+ this.register(require('./GuildRolesPositionUpdate'));
27
+ this.register(require('./GuildScheduledEventDelete'));
28
+ this.register(require('./GuildScheduledEventUserAdd'));
29
+ this.register(require('./GuildScheduledEventUserRemove'));
30
+ this.register(require('./GuildStickerCreate'));
31
+ this.register(require('./GuildStickerDelete'));
32
+ this.register(require('./GuildStickerUpdate'));
33
+ this.register(require('./GuildStickersUpdate'));
34
+ this.register(require('./GuildUpdate'));
35
+ this.register(require('./InteractionCreate'));
36
+ this.register(require('./MessageCreate'));
37
+ this.register(require('./MessageDelete'));
38
+ this.register(require('./MessageDeleteBulk'));
39
+ this.register(require('./MessagePollVoteAdd'));
40
+ this.register(require('./MessagePollVoteRemove'));
41
+ this.register(require('./MessageReactionAdd'));
42
+ this.register(require('./MessageReactionRemove'));
43
+ this.register(require('./MessageReactionRemoveAll'));
44
+ this.register(require('./MessageReactionRemoveEmoji'));
45
+ this.register(require('./MessageUpdate'));
46
+ this.register(require('./StageInstanceCreate'));
47
+ this.register(require('./StageInstanceDelete'));
48
+ this.register(require('./StageInstanceUpdate'));
49
+ this.register(require('./ThreadCreate'));
50
+ this.register(require('./ThreadMembersUpdate'));
51
+ this.register(require('./TypingStart'));
52
+ this.register(require('./UserUpdate'));
55
53
  }
56
54
 
57
55
  register(Action) {
@@ -59,4 +57,4 @@ class ActionsManager {
59
57
  }
60
58
  }
61
59
 
62
- exports.ActionsManager = ActionsManager;
60
+ module.exports = ActionsManager;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class ChannelCreateAction extends Action {
7
7
  handle(data) {
@@ -20,4 +20,4 @@ class ChannelCreateAction extends Action {
20
20
  }
21
21
  }
22
22
 
23
- exports.ChannelCreateAction = ChannelCreateAction;
23
+ module.exports = ChannelCreateAction;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class ChannelDeleteAction extends Action {
7
7
  handle(data) {
@@ -20,4 +20,4 @@ class ChannelDeleteAction extends Action {
20
20
  }
21
21
  }
22
22
 
23
- exports.ChannelDeleteAction = ChannelDeleteAction;
23
+ module.exports = ChannelDeleteAction;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
3
+ const Action = require('./Action');
4
4
  const { createChannel } = require('../../util/Channels');
5
5
 
6
6
  class ChannelUpdateAction extends Action {
@@ -39,4 +39,4 @@ class ChannelUpdateAction extends Action {
39
39
  }
40
40
  }
41
41
 
42
- exports.ChannelUpdateAction = ChannelUpdateAction;
42
+ module.exports = ChannelUpdateAction;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
3
+ const Action = require('./Action');
4
4
 
5
- class GuildChannelsPositionUpdateAction extends Action {
5
+ class GuildChannelsPositionUpdate extends Action {
6
6
  handle(data) {
7
7
  const client = this.client;
8
8
 
@@ -18,4 +18,4 @@ class GuildChannelsPositionUpdateAction extends Action {
18
18
  }
19
19
  }
20
20
 
21
- exports.GuildChannelsPositionUpdateAction = GuildChannelsPositionUpdateAction;
21
+ module.exports = GuildChannelsPositionUpdate;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildEmojiCreateAction extends Action {
7
7
  handle(guild, createdEmoji) {
@@ -17,4 +17,4 @@ class GuildEmojiCreateAction extends Action {
17
17
  }
18
18
  }
19
19
 
20
- exports.GuildEmojiCreateAction = GuildEmojiCreateAction;
20
+ module.exports = GuildEmojiCreateAction;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildEmojiDeleteAction extends Action {
7
7
  handle(emoji) {
@@ -16,4 +16,4 @@ class GuildEmojiDeleteAction extends Action {
16
16
  }
17
17
  }
18
18
 
19
- exports.GuildEmojiDeleteAction = GuildEmojiDeleteAction;
19
+ module.exports = GuildEmojiDeleteAction;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildEmojiUpdateAction extends Action {
7
7
  handle(current, data) {
@@ -17,4 +17,4 @@ class GuildEmojiUpdateAction extends Action {
17
17
  }
18
18
  }
19
19
 
20
- exports.GuildEmojiUpdateAction = GuildEmojiUpdateAction;
20
+ module.exports = GuildEmojiUpdateAction;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
3
+ const Action = require('./Action');
4
4
 
5
5
  class GuildEmojisUpdateAction extends Action {
6
6
  handle(data) {
@@ -31,4 +31,4 @@ class GuildEmojisUpdateAction extends Action {
31
31
  }
32
32
  }
33
33
 
34
- exports.GuildEmojisUpdateAction = GuildEmojisUpdateAction;
34
+ module.exports = GuildEmojisUpdateAction;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildMemberRemoveAction extends Action {
7
7
  handle(data) {
@@ -27,4 +27,4 @@ class GuildMemberRemoveAction extends Action {
27
27
  }
28
28
  }
29
29
 
30
- exports.GuildMemberRemoveAction = GuildMemberRemoveAction;
30
+ module.exports = GuildMemberRemoveAction;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildMemberUpdateAction extends Action {
7
7
  handle(data) {
@@ -40,4 +40,4 @@ class GuildMemberUpdateAction extends Action {
40
40
  }
41
41
  }
42
42
 
43
- exports.GuildMemberUpdateAction = GuildMemberUpdateAction;
43
+ module.exports = GuildMemberUpdateAction;
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
- class GuildRoleCreateAction extends Action {
6
+ class GuildRoleCreate extends Action {
7
7
  handle(data) {
8
8
  const client = this.client;
9
9
  const guild = client.guilds.cache.get(data.guild_id);
@@ -22,4 +22,4 @@ class GuildRoleCreateAction extends Action {
22
22
  }
23
23
  }
24
24
 
25
- exports.GuildRoleCreateAction = GuildRoleCreateAction;
25
+ module.exports = GuildRoleCreate;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildRoleDeleteAction extends Action {
7
7
  handle(data) {
@@ -26,4 +26,4 @@ class GuildRoleDeleteAction extends Action {
26
26
  }
27
27
  }
28
28
 
29
- exports.GuildRoleDeleteAction = GuildRoleDeleteAction;
29
+ module.exports = GuildRoleDeleteAction;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
3
+ const Action = require('./Action');
4
4
 
5
- class GuildRolesPositionUpdateAction extends Action {
5
+ class GuildRolesPositionUpdate extends Action {
6
6
  handle(data) {
7
7
  const client = this.client;
8
8
 
@@ -18,4 +18,4 @@ class GuildRolesPositionUpdateAction extends Action {
18
18
  }
19
19
  }
20
20
 
21
- exports.GuildRolesPositionUpdateAction = GuildRolesPositionUpdateAction;
21
+ module.exports = GuildRolesPositionUpdate;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildScheduledEventDeleteAction extends Action {
7
7
  handle(data) {
@@ -28,4 +28,4 @@ class GuildScheduledEventDeleteAction extends Action {
28
28
  }
29
29
  }
30
30
 
31
- exports.GuildScheduledEventDeleteAction = GuildScheduledEventDeleteAction;
31
+ module.exports = GuildScheduledEventDeleteAction;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildScheduledEventUserAddAction extends Action {
7
7
  handle(data) {
@@ -29,4 +29,4 @@ class GuildScheduledEventUserAddAction extends Action {
29
29
  }
30
30
  }
31
31
 
32
- exports.GuildScheduledEventUserAddAction = GuildScheduledEventUserAddAction;
32
+ module.exports = GuildScheduledEventUserAddAction;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildScheduledEventUserRemoveAction extends Action {
7
7
  handle(data) {
@@ -29,4 +29,4 @@ class GuildScheduledEventUserRemoveAction extends Action {
29
29
  }
30
30
  }
31
31
 
32
- exports.GuildScheduledEventUserRemoveAction = GuildScheduledEventUserRemoveAction;
32
+ module.exports = GuildScheduledEventUserRemoveAction;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildStickerCreateAction extends Action {
7
7
  handle(guild, createdSticker) {
@@ -17,4 +17,4 @@ class GuildStickerCreateAction extends Action {
17
17
  }
18
18
  }
19
19
 
20
- exports.GuildStickerCreateAction = GuildStickerCreateAction;
20
+ module.exports = GuildStickerCreateAction;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildStickerDeleteAction extends Action {
7
7
  handle(sticker) {
@@ -16,4 +16,4 @@ class GuildStickerDeleteAction extends Action {
16
16
  }
17
17
  }
18
18
 
19
- exports.GuildStickerDeleteAction = GuildStickerDeleteAction;
19
+ module.exports = GuildStickerDeleteAction;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildStickerUpdateAction extends Action {
7
7
  handle(current, data) {
@@ -17,4 +17,4 @@ class GuildStickerUpdateAction extends Action {
17
17
  }
18
18
  }
19
19
 
20
- exports.GuildStickerUpdateAction = GuildStickerUpdateAction;
20
+ module.exports = GuildStickerUpdateAction;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
3
+ const Action = require('./Action');
4
4
 
5
5
  class GuildStickersUpdateAction extends Action {
6
6
  handle(data) {
@@ -31,4 +31,4 @@ class GuildStickersUpdateAction extends Action {
31
31
  }
32
32
  }
33
33
 
34
- exports.GuildStickersUpdateAction = GuildStickersUpdateAction;
34
+ module.exports = GuildStickersUpdateAction;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { Action } = require('./Action');
4
- const { Events } = require('../../util/Events');
3
+ const Action = require('./Action');
4
+ const Events = require('../../util/Events');
5
5
 
6
6
  class GuildUpdateAction extends Action {
7
7
  handle(data) {
@@ -30,4 +30,4 @@ class GuildUpdateAction extends Action {
30
30
  }
31
31
  }
32
32
 
33
- exports.GuildUpdateAction = GuildUpdateAction;
33
+ module.exports = GuildUpdateAction;
@@ -1,19 +1,19 @@
1
1
  'use strict';
2
2
 
3
3
  const { InteractionType, ComponentType, ApplicationCommandType } = require('discord-api-types/v10');
4
- const { Action } = require('./Action');
5
- const { AutocompleteInteraction } = require('../../structures/AutocompleteInteraction');
6
- const { ButtonInteraction } = require('../../structures/ButtonInteraction');
7
- const { ChannelSelectMenuInteraction } = require('../../structures/ChannelSelectMenuInteraction');
8
- const { ChatInputCommandInteraction } = require('../../structures/ChatInputCommandInteraction');
9
- const { MentionableSelectMenuInteraction } = require('../../structures/MentionableSelectMenuInteraction');
10
- const { MessageContextMenuCommandInteraction } = require('../../structures/MessageContextMenuCommandInteraction');
11
- const { ModalSubmitInteraction } = require('../../structures/ModalSubmitInteraction');
12
- const { RoleSelectMenuInteraction } = require('../../structures/RoleSelectMenuInteraction');
13
- const { StringSelectMenuInteraction } = require('../../structures/StringSelectMenuInteraction');
14
- const { UserContextMenuCommandInteraction } = require('../../structures/UserContextMenuCommandInteraction');
15
- const { UserSelectMenuInteraction } = require('../../structures/UserSelectMenuInteraction');
16
- const { Events } = require('../../util/Events');
4
+ const Action = require('./Action');
5
+ const AutocompleteInteraction = require('../../structures/AutocompleteInteraction');
6
+ const ButtonInteraction = require('../../structures/ButtonInteraction');
7
+ const ChannelSelectMenuInteraction = require('../../structures/ChannelSelectMenuInteraction');
8
+ const ChatInputCommandInteraction = require('../../structures/ChatInputCommandInteraction');
9
+ const MentionableSelectMenuInteraction = require('../../structures/MentionableSelectMenuInteraction');
10
+ const MessageContextMenuCommandInteraction = require('../../structures/MessageContextMenuCommandInteraction');
11
+ const ModalSubmitInteraction = require('../../structures/ModalSubmitInteraction');
12
+ const RoleSelectMenuInteraction = require('../../structures/RoleSelectMenuInteraction');
13
+ const StringSelectMenuInteraction = require('../../structures/StringSelectMenuInteraction');
14
+ const UserContextMenuCommandInteraction = require('../../structures/UserContextMenuCommandInteraction');
15
+ const UserSelectMenuInteraction = require('../../structures/UserSelectMenuInteraction');
16
+ const Events = require('../../util/Events');
17
17
 
18
18
  class InteractionCreateAction extends Action {
19
19
  handle(data) {
@@ -98,4 +98,4 @@ class InteractionCreateAction extends Action {
98
98
  }
99
99
  }
100
100
 
101
- exports.InteractionCreateAction = InteractionCreateAction;
101
+ module.exports = InteractionCreateAction;