discord.js 15.0.0-dev.1737245587-aa90f00d1 → 15.0.0-dev.1737720285-670667d65
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.
- package/package.json +5 -4
- package/src/client/BaseClient.js +7 -7
- package/src/client/Client.js +26 -26
- package/src/client/WebhookClient.js +4 -4
- package/src/client/actions/Action.js +1 -1
- package/src/client/actions/ActionsManager.js +39 -41
- package/src/client/actions/ChannelCreate.js +2 -2
- package/src/client/actions/ChannelDelete.js +2 -2
- package/src/client/actions/ChannelUpdate.js +2 -2
- package/src/client/actions/GuildChannelsPositionUpdate.js +1 -1
- package/src/client/actions/GuildEmojiCreate.js +2 -2
- package/src/client/actions/GuildEmojiDelete.js +2 -2
- package/src/client/actions/GuildEmojiUpdate.js +2 -2
- package/src/client/actions/GuildEmojisUpdate.js +1 -1
- package/src/client/actions/GuildMemberRemove.js +2 -2
- package/src/client/actions/GuildMemberUpdate.js +2 -2
- package/src/client/actions/GuildRoleCreate.js +2 -2
- package/src/client/actions/GuildRoleDelete.js +2 -2
- package/src/client/actions/GuildRolesPositionUpdate.js +1 -1
- package/src/client/actions/GuildScheduledEventDelete.js +2 -2
- package/src/client/actions/GuildScheduledEventUserAdd.js +2 -2
- package/src/client/actions/GuildScheduledEventUserRemove.js +2 -2
- package/src/client/actions/GuildStickerCreate.js +2 -2
- package/src/client/actions/GuildStickerDelete.js +2 -2
- package/src/client/actions/GuildStickerUpdate.js +2 -2
- package/src/client/actions/GuildStickersUpdate.js +1 -1
- package/src/client/actions/GuildUpdate.js +2 -2
- package/src/client/actions/InteractionCreate.js +13 -13
- package/src/client/actions/MessageCreate.js +2 -2
- package/src/client/actions/MessageDelete.js +2 -2
- package/src/client/actions/MessageDeleteBulk.js +2 -2
- package/src/client/actions/MessagePollVoteAdd.js +2 -2
- package/src/client/actions/MessagePollVoteRemove.js +2 -2
- package/src/client/actions/MessageReactionAdd.js +3 -3
- package/src/client/actions/MessageReactionRemove.js +2 -2
- package/src/client/actions/MessageReactionRemoveAll.js +2 -2
- package/src/client/actions/MessageReactionRemoveEmoji.js +2 -2
- package/src/client/actions/MessageUpdate.js +1 -1
- package/src/client/actions/StageInstanceCreate.js +2 -2
- package/src/client/actions/StageInstanceDelete.js +2 -2
- package/src/client/actions/StageInstanceUpdate.js +2 -2
- package/src/client/actions/ThreadCreate.js +2 -2
- package/src/client/actions/ThreadMembersUpdate.js +2 -2
- package/src/client/actions/TypingStart.js +3 -3
- package/src/client/actions/UserUpdate.js +2 -2
- package/src/client/websocket/handlers/AUTO_MODERATION_RULE_CREATE.js +1 -1
- package/src/client/websocket/handlers/CHANNEL_PINS_UPDATE.js +1 -1
- package/src/client/websocket/handlers/CHANNEL_UPDATE.js +1 -1
- package/src/client/websocket/handlers/GUILD_CREATE.js +2 -2
- package/src/client/websocket/handlers/GUILD_MEMBERS_CHUNK.js +1 -1
- package/src/client/websocket/handlers/GUILD_MEMBER_ADD.js +1 -1
- package/src/client/websocket/handlers/MESSAGE_UPDATE.js +1 -1
- package/src/client/websocket/handlers/READY.js +2 -2
- package/src/client/websocket/handlers/SUBSCRIPTION_CREATE.js +1 -1
- package/src/client/websocket/handlers/SUBSCRIPTION_DELETE.js +1 -1
- package/src/client/websocket/handlers/SUBSCRIPTION_UPDATE.js +1 -1
- package/src/client/websocket/handlers/THREAD_UPDATE.js +1 -1
- package/src/client/websocket/handlers/VOICE_CHANNEL_EFFECT_SEND.js +2 -2
- package/src/client/websocket/handlers/index.js +66 -66
- package/src/errors/DJSError.js +2 -2
- package/src/errors/Messages.js +1 -1
- package/src/errors/index.js +5 -5
- package/src/index.js +204 -198
- package/src/managers/ApplicationCommandManager.js +5 -5
- package/src/managers/ApplicationCommandPermissionsManager.js +2 -2
- package/src/managers/ApplicationEmojiManager.js +4 -4
- package/src/managers/AutoModerationRuleManager.js +2 -2
- package/src/managers/BaseGuildEmojiManager.js +5 -5
- package/src/managers/CachedManager.js +2 -2
- package/src/managers/CategoryChannelChildManager.js +2 -2
- package/src/managers/ChannelManager.js +5 -5
- package/src/managers/DMMessageManager.js +1 -1
- package/src/managers/DataManager.js +2 -2
- package/src/managers/EntitlementManager.js +4 -4
- package/src/managers/GuildApplicationCommandManager.js +2 -2
- package/src/managers/GuildBanManager.js +10 -24
- package/src/managers/GuildChannelManager.js +12 -12
- package/src/managers/GuildEmojiManager.js +3 -3
- package/src/managers/GuildEmojiRoleManager.js +7 -7
- package/src/managers/GuildForumThreadManager.js +3 -3
- package/src/managers/GuildInviteManager.js +8 -8
- package/src/managers/GuildManager.js +14 -14
- package/src/managers/GuildMemberManager.js +26 -41
- package/src/managers/GuildMemberRoleManager.js +3 -3
- package/src/managers/GuildMessageManager.js +2 -2
- package/src/managers/GuildScheduledEventManager.js +5 -5
- package/src/managers/GuildStickerManager.js +4 -4
- package/src/managers/GuildTextThreadManager.js +2 -2
- package/src/managers/MessageManager.js +6 -6
- package/src/managers/PartialGroupDMMessageManager.js +1 -1
- package/src/managers/PermissionOverwriteManager.js +10 -12
- package/src/managers/PresenceManager.js +2 -2
- package/src/managers/ReactionManager.js +2 -2
- package/src/managers/ReactionUserManager.js +3 -3
- package/src/managers/RoleManager.js +6 -6
- package/src/managers/StageInstanceManager.js +3 -3
- package/src/managers/SubscriptionManager.js +4 -4
- package/src/managers/ThreadManager.js +4 -4
- package/src/managers/ThreadMemberManager.js +3 -3
- package/src/managers/UserManager.js +6 -6
- package/src/managers/VoiceStateManager.js +2 -2
- package/src/sharding/Shard.js +14 -14
- package/src/sharding/ShardClientUtil.js +5 -5
- package/src/sharding/ShardingManager.js +12 -12
- package/src/structures/ActionRow.js +2 -2
- package/src/structures/ActionRowBuilder.js +2 -2
- package/src/structures/AnnouncementChannel.js +1 -1
- package/src/structures/AnonymousGuild.js +1 -1
- package/src/structures/ApplicationCommand.js +3 -3
- package/src/structures/ApplicationEmoji.js +1 -1
- package/src/structures/Attachment.js +1 -1
- package/src/structures/AttachmentBuilder.js +1 -1
- package/src/structures/AutoModerationActionExecution.js +1 -1
- package/src/structures/AutoModerationRule.js +2 -2
- package/src/structures/AutocompleteInteraction.js +3 -3
- package/src/structures/Base.js +1 -1
- package/src/structures/BaseChannel.js +3 -3
- package/src/structures/BaseGuild.js +1 -1
- package/src/structures/BaseGuildEmoji.js +1 -1
- package/src/structures/BaseGuildTextChannel.js +4 -4
- package/src/structures/BaseGuildVoiceChannel.js +3 -3
- package/src/structures/BaseInteraction.js +3 -3
- package/src/structures/BaseSelectMenuComponent.js +1 -1
- package/src/structures/ButtonBuilder.js +2 -2
- package/src/structures/ButtonComponent.js +1 -1
- package/src/structures/ButtonInteraction.js +1 -1
- package/src/structures/CategoryChannel.js +2 -2
- package/src/structures/ChannelSelectMenuBuilder.js +1 -1
- package/src/structures/ChannelSelectMenuComponent.js +1 -1
- package/src/structures/ChannelSelectMenuInteraction.js +1 -1
- package/src/structures/ChatInputCommandInteraction.js +3 -3
- package/src/structures/ClientApplication.js +11 -11
- package/src/structures/ClientPresence.js +2 -2
- package/src/structures/ClientUser.js +2 -2
- package/src/structures/CommandInteraction.js +4 -4
- package/src/structures/CommandInteractionOptionResolver.js +1 -1
- package/src/structures/ContextMenuCommandInteraction.js +4 -4
- package/src/structures/DMChannel.js +4 -4
- package/src/structures/DirectoryChannel.js +1 -1
- package/src/structures/EmbedBuilder.js +2 -2
- package/src/structures/Emoji.js +1 -1
- package/src/structures/Entitlement.js +1 -1
- package/src/structures/ForumChannel.js +1 -1
- package/src/structures/Guild.js +25 -25
- package/src/structures/GuildAuditLogs.js +5 -5
- package/src/structures/GuildAuditLogsEntry.js +10 -10
- package/src/structures/GuildBan.js +1 -1
- package/src/structures/GuildChannel.js +8 -8
- package/src/structures/GuildEmoji.js +3 -3
- package/src/structures/GuildMember.js +14 -16
- package/src/structures/GuildOnboarding.js +2 -2
- package/src/structures/GuildOnboardingPrompt.js +2 -2
- package/src/structures/GuildOnboardingPromptOption.js +1 -1
- package/src/structures/GuildPreview.js +3 -3
- package/src/structures/GuildPreviewEmoji.js +1 -1
- package/src/structures/GuildScheduledEvent.js +2 -2
- package/src/structures/GuildTemplate.js +3 -3
- package/src/structures/Integration.js +2 -2
- package/src/structures/IntegrationApplication.js +1 -1
- package/src/structures/InteractionCallbackResource.js +1 -1
- package/src/structures/InteractionCallbackResponse.js +2 -2
- package/src/structures/InteractionCollector.js +2 -2
- package/src/structures/InteractionWebhook.js +1 -1
- package/src/structures/Invite.js +5 -5
- package/src/structures/InviteGuild.js +2 -2
- package/src/structures/MediaChannel.js +1 -1
- package/src/structures/MentionableSelectMenuBuilder.js +1 -1
- package/src/structures/MentionableSelectMenuComponent.js +1 -1
- package/src/structures/MentionableSelectMenuInteraction.js +2 -2
- package/src/structures/Message.js +32 -32
- package/src/structures/MessageCollector.js +2 -2
- package/src/structures/MessageComponentInteraction.js +4 -4
- package/src/structures/MessageContextMenuCommandInteraction.js +1 -1
- package/src/structures/MessageMentions.js +1 -1
- package/src/structures/MessagePayload.js +11 -11
- package/src/structures/MessageReaction.js +5 -5
- package/src/structures/ModalBuilder.js +1 -1
- package/src/structures/ModalSubmitFields.js +1 -1
- package/src/structures/ModalSubmitInteraction.js +5 -5
- package/src/structures/OAuth2Guild.js +2 -2
- package/src/structures/PartialGroupDMChannel.js +8 -8
- package/src/structures/PermissionOverwrites.js +4 -4
- package/src/structures/Poll.js +5 -6
- package/src/structures/PollAnswer.js +2 -2
- package/src/structures/Presence.js +4 -4
- package/src/structures/ReactionCollector.js +2 -2
- package/src/structures/ReactionEmoji.js +2 -2
- package/src/structures/Role.js +4 -4
- package/src/structures/RoleSelectMenuBuilder.js +1 -1
- package/src/structures/RoleSelectMenuComponent.js +1 -1
- package/src/structures/RoleSelectMenuInteraction.js +1 -1
- package/src/structures/SKU.js +2 -2
- package/src/structures/StageChannel.js +1 -1
- package/src/structures/StageInstance.js +1 -1
- package/src/structures/Sticker.js +5 -5
- package/src/structures/StickerPack.js +2 -2
- package/src/structures/StringSelectMenuBuilder.js +2 -2
- package/src/structures/StringSelectMenuComponent.js +1 -1
- package/src/structures/StringSelectMenuInteraction.js +1 -1
- package/src/structures/StringSelectMenuOptionBuilder.js +2 -2
- package/src/structures/Subscription.js +1 -1
- package/src/structures/Team.js +2 -2
- package/src/structures/TeamMember.js +1 -1
- package/src/structures/TextChannel.js +1 -1
- package/src/structures/TextInputBuilder.js +1 -1
- package/src/structures/TextInputComponent.js +1 -1
- package/src/structures/ThreadChannel.js +9 -10
- package/src/structures/ThreadMember.js +2 -2
- package/src/structures/ThreadOnlyChannel.js +4 -4
- package/src/structures/Typing.js +1 -1
- package/src/structures/User.js +3 -3
- package/src/structures/UserContextMenuCommandInteraction.js +1 -1
- package/src/structures/UserSelectMenuBuilder.js +1 -1
- package/src/structures/UserSelectMenuComponent.js +1 -1
- package/src/structures/UserSelectMenuInteraction.js +2 -2
- package/src/structures/VoiceChannel.js +1 -1
- package/src/structures/VoiceChannelEffect.js +1 -1
- package/src/structures/VoiceRegion.js +1 -1
- package/src/structures/VoiceState.js +2 -2
- package/src/structures/Webhook.js +4 -4
- package/src/structures/WelcomeChannel.js +2 -2
- package/src/structures/WelcomeScreen.js +2 -2
- package/src/structures/Widget.js +2 -2
- package/src/structures/WidgetMember.js +1 -1
- package/src/structures/interfaces/Application.js +1 -1
- package/src/structures/interfaces/Collector.js +5 -5
- package/src/structures/interfaces/InteractionResponses.js +7 -7
- package/src/structures/interfaces/TextBasedChannel.js +8 -8
- package/src/util/ActivityFlagsBitField.js +1 -1
- package/src/util/ApplicationFlagsBitField.js +1 -1
- package/src/util/AttachmentFlagsBitField.js +1 -1
- package/src/util/BitField.js +1 -1
- package/src/util/ChannelFlagsBitField.js +1 -1
- package/src/util/Channels.js +11 -11
- package/src/util/Components.js +17 -17
- package/src/util/DataResolver.js +3 -3
- package/src/util/GuildMemberFlagsBitField.js +1 -1
- package/src/util/IntentsBitField.js +1 -1
- package/src/util/LimitedCollection.js +1 -1
- package/src/util/MessageFlagsBitField.js +1 -1
- package/src/util/Options.js +2 -2
- package/src/util/Partials.js +1 -1
- package/src/util/PermissionsBitField.js +1 -1
- package/src/util/RoleFlagsBitField.js +1 -1
- package/src/util/SKUFlagsBitField.js +1 -1
- package/src/util/Status.js +1 -1
- package/src/util/Sweepers.js +3 -3
- package/src/util/SystemChannelFlagsBitField.js +1 -1
- package/src/util/ThreadMemberFlagsBitField.js +1 -1
- package/src/util/UserFlagsBitField.js +1 -1
- package/src/util/Util.js +4 -4
- package/typings/index.d.mts +43 -122
- package/typings/index.d.ts +43 -122
- package/typings/index.test-d.ts +28 -5
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.
|
|
4
|
+
"version": "15.0.0-dev.1737720285-670667d65",
|
|
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",
|
|
@@ -54,13 +54,14 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@discordjs/builders": "^1.9.0",
|
|
56
56
|
"@sapphire/snowflake": "3.5.5",
|
|
57
|
+
"@vladfrangu/async_event_emitter": "^2.4.6",
|
|
57
58
|
"discord-api-types": "^0.37.114",
|
|
58
59
|
"fast-deep-equal": "3.1.3",
|
|
59
60
|
"lodash.snakecase": "4.1.1",
|
|
60
61
|
"tslib": "^2.8.1",
|
|
61
62
|
"undici": "6.21.0",
|
|
62
|
-
"@discordjs/formatters": "^0.5.0",
|
|
63
63
|
"@discordjs/collection": "^2.1.1",
|
|
64
|
+
"@discordjs/formatters": "^0.5.0",
|
|
64
65
|
"@discordjs/util": "^1.1.1",
|
|
65
66
|
"@discordjs/ws": "^2.0.0",
|
|
66
67
|
"@discordjs/rest": "^2.4.0"
|
|
@@ -81,8 +82,8 @@
|
|
|
81
82
|
"turbo": "^2.3.3",
|
|
82
83
|
"typescript": "~5.5.4",
|
|
83
84
|
"@discordjs/api-extractor": "^7.38.1",
|
|
84
|
-
"@discordjs/
|
|
85
|
-
"@discordjs/
|
|
85
|
+
"@discordjs/docgen": "^0.12.1",
|
|
86
|
+
"@discordjs/scripts": "^0.1.0"
|
|
86
87
|
},
|
|
87
88
|
"engines": {
|
|
88
89
|
"node": ">=20"
|
package/src/client/BaseClient.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const EventEmitter = require('node:events');
|
|
4
3
|
const { REST } = require('@discordjs/rest');
|
|
4
|
+
const { AsyncEventEmitter } = require('@vladfrangu/async_event_emitter');
|
|
5
5
|
const { Routes } = require('discord-api-types/v10');
|
|
6
|
-
const { DiscordjsTypeError, ErrorCodes } = require('../errors');
|
|
7
|
-
const { Options } = require('../util/Options');
|
|
8
|
-
const { flatten } = require('../util/Util');
|
|
6
|
+
const { DiscordjsTypeError, ErrorCodes } = require('../errors/index.js');
|
|
7
|
+
const { Options } = require('../util/Options.js');
|
|
8
|
+
const { flatten } = require('../util/Util.js');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* The base class for all clients.
|
|
12
|
-
* @extends {
|
|
12
|
+
* @extends {AsyncEventEmitter}
|
|
13
13
|
*/
|
|
14
|
-
class BaseClient extends
|
|
14
|
+
class BaseClient extends AsyncEventEmitter {
|
|
15
15
|
constructor(options = {}) {
|
|
16
|
-
super(
|
|
16
|
+
super();
|
|
17
17
|
|
|
18
18
|
if (typeof options !== 'object' || options === null) {
|
|
19
19
|
throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true);
|
package/src/client/Client.js
CHANGED
|
@@ -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');
|
|
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');
|
|
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');
|
|
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');
|
|
9
|
+
const { BaseClient } = require('./BaseClient.js');
|
|
10
|
+
const { ActionsManager } = require('./actions/ActionsManager.js');
|
|
11
|
+
const { ClientVoiceManager } = require('./voice/ClientVoiceManager.js');
|
|
12
|
+
const { PacketHandlers } = require('./websocket/handlers/index.js');
|
|
13
|
+
const { DiscordjsError, DiscordjsTypeError, ErrorCodes } = require('../errors/index.js');
|
|
14
|
+
const { BaseGuildEmojiManager } = require('../managers/BaseGuildEmojiManager.js');
|
|
15
|
+
const { ChannelManager } = require('../managers/ChannelManager.js');
|
|
16
|
+
const { GuildManager } = require('../managers/GuildManager.js');
|
|
17
|
+
const { UserManager } = require('../managers/UserManager.js');
|
|
18
|
+
const { ShardClientUtil } = require('../sharding/ShardClientUtil.js');
|
|
19
|
+
const { ClientPresence } = require('../structures/ClientPresence.js');
|
|
20
|
+
const { GuildPreview } = require('../structures/GuildPreview.js');
|
|
21
|
+
const { GuildTemplate } = require('../structures/GuildTemplate.js');
|
|
22
|
+
const { Invite } = require('../structures/Invite.js');
|
|
23
|
+
const { Sticker } = require('../structures/Sticker.js');
|
|
24
|
+
const { StickerPack } = require('../structures/StickerPack.js');
|
|
25
|
+
const { VoiceRegion } = require('../structures/VoiceRegion.js');
|
|
26
|
+
const { Webhook } = require('../structures/Webhook.js');
|
|
27
|
+
const { Widget } = require('../structures/Widget.js');
|
|
28
|
+
const { resolveInviteCode, resolveGuildTemplateCode } = require('../util/DataResolver.js');
|
|
29
|
+
const { Events } = require('../util/Events.js');
|
|
30
|
+
const { IntentsBitField } = require('../util/IntentsBitField.js');
|
|
31
|
+
const { Options } = require('../util/Options.js');
|
|
32
|
+
const { PermissionsBitField } = require('../util/PermissionsBitField.js');
|
|
33
|
+
const { Status } = require('../util/Status.js');
|
|
34
|
+
const { Sweepers } = require('../util/Sweepers.js');
|
|
35
35
|
|
|
36
36
|
const WaitingForGuildEvents = [GatewayDispatchEvents.GuildCreate, GatewayDispatchEvents.GuildDelete];
|
|
37
37
|
const BeforeReadyWhitelist = [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const { BaseClient } = require('./BaseClient');
|
|
4
|
-
const { DiscordjsError, ErrorCodes } = require('../errors');
|
|
5
|
-
const { Webhook } = require('../structures/Webhook');
|
|
6
|
-
const { parseWebhookURL } = require('../util/Util');
|
|
3
|
+
const { BaseClient } = require('./BaseClient.js');
|
|
4
|
+
const { DiscordjsError, ErrorCodes } = require('../errors/index.js');
|
|
5
|
+
const { Webhook } = require('../structures/Webhook.js');
|
|
6
|
+
const { parseWebhookURL } = require('../util/Util.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The webhook client.
|
|
@@ -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('./
|
|
22
|
-
this.register(require('./
|
|
23
|
-
this.register(require('./
|
|
24
|
-
this.register(require('./
|
|
25
|
-
this.register(require('./
|
|
26
|
-
this.register(require('./
|
|
27
|
-
this.register(require('./
|
|
28
|
-
this.register(require('./
|
|
29
|
-
this.register(require('./
|
|
30
|
-
this.register(require('./
|
|
31
|
-
this.register(require('./
|
|
32
|
-
this.register(require('./
|
|
33
|
-
this.register(require('./
|
|
34
|
-
this.register(require('./
|
|
35
|
-
this.register(require('./
|
|
36
|
-
this.register(require('./
|
|
37
|
-
this.register(require('./
|
|
38
|
-
this.register(require('./
|
|
39
|
-
this.register(require('./
|
|
40
|
-
this.register(require('./
|
|
41
|
-
this.register(require('./
|
|
42
|
-
this.register(require('./
|
|
43
|
-
this.register(require('./
|
|
44
|
-
this.register(require('./
|
|
45
|
-
this.register(require('./
|
|
46
|
-
this.register(require('./
|
|
47
|
-
this.register(require('./
|
|
48
|
-
this.register(require('./
|
|
49
|
-
this.register(require('./
|
|
50
|
-
this.register(require('./
|
|
51
|
-
this.register(require('./
|
|
52
|
-
this.register(require('./
|
|
53
|
-
this.register(require('./TypingStart').TypingStartAction);
|
|
54
|
-
this.register(require('./UserUpdate').UserUpdateAction);
|
|
14
|
+
this.register(require('./ChannelCreate.js').ChannelCreateAction);
|
|
15
|
+
this.register(require('./ChannelDelete.js').ChannelDeleteAction);
|
|
16
|
+
this.register(require('./ChannelUpdate.js').ChannelUpdateAction);
|
|
17
|
+
this.register(require('./GuildChannelsPositionUpdate.js').GuildChannelsPositionUpdateAction);
|
|
18
|
+
this.register(require('./GuildEmojiCreate.js').GuildEmojiCreateAction);
|
|
19
|
+
this.register(require('./GuildEmojiDelete.js').GuildEmojiDeleteAction);
|
|
20
|
+
this.register(require('./GuildEmojiUpdate.js').GuildEmojiUpdateAction);
|
|
21
|
+
this.register(require('./GuildEmojisUpdate.js').GuildEmojisUpdateAction);
|
|
22
|
+
this.register(require('./GuildMemberRemove.js').GuildMemberRemoveAction);
|
|
23
|
+
this.register(require('./GuildMemberUpdate.js').GuildMemberUpdateAction);
|
|
24
|
+
this.register(require('./GuildRoleCreate.js').GuildRoleCreateAction);
|
|
25
|
+
this.register(require('./GuildRoleDelete.js').GuildRoleDeleteAction);
|
|
26
|
+
this.register(require('./GuildRolesPositionUpdate.js').GuildRolesPositionUpdateAction);
|
|
27
|
+
this.register(require('./GuildScheduledEventDelete.js').GuildScheduledEventDeleteAction);
|
|
28
|
+
this.register(require('./GuildScheduledEventUserAdd.js').GuildScheduledEventUserAddAction);
|
|
29
|
+
this.register(require('./GuildScheduledEventUserRemove.js').GuildScheduledEventUserRemoveAction);
|
|
30
|
+
this.register(require('./GuildStickerCreate.js').GuildStickerCreateAction);
|
|
31
|
+
this.register(require('./GuildStickerDelete.js').GuildStickerDeleteAction);
|
|
32
|
+
this.register(require('./GuildStickerUpdate.js').GuildStickerUpdateAction);
|
|
33
|
+
this.register(require('./GuildStickersUpdate.js').GuildStickersUpdateAction);
|
|
34
|
+
this.register(require('./GuildUpdate.js').GuildUpdateAction);
|
|
35
|
+
this.register(require('./InteractionCreate.js').InteractionCreateAction);
|
|
36
|
+
this.register(require('./MessageCreate.js').MessageCreateAction);
|
|
37
|
+
this.register(require('./MessageDelete.js').MessageDeleteAction);
|
|
38
|
+
this.register(require('./MessageDeleteBulk.js').MessageDeleteBulkAction);
|
|
39
|
+
this.register(require('./MessagePollVoteAdd.js').MessagePollVoteAddAction);
|
|
40
|
+
this.register(require('./MessagePollVoteRemove.js').MessagePollVoteRemoveAction);
|
|
41
|
+
this.register(require('./MessageReactionAdd.js').MessageReactionAddAction);
|
|
42
|
+
this.register(require('./MessageReactionRemove.js').MessageReactionRemoveAction);
|
|
43
|
+
this.register(require('./MessageReactionRemoveAll.js').MessageReactionRemoveAllAction);
|
|
44
|
+
this.register(require('./MessageReactionRemoveEmoji.js').MessageReactionRemoveEmojiAction);
|
|
45
|
+
this.register(require('./MessageUpdate.js').MessageUpdateAction);
|
|
46
|
+
this.register(require('./StageInstanceCreate.js').StageInstanceCreateAction);
|
|
47
|
+
this.register(require('./StageInstanceDelete.js').StageInstanceDeleteAction);
|
|
48
|
+
this.register(require('./StageInstanceUpdate.js').StageInstanceUpdateAction);
|
|
49
|
+
this.register(require('./ThreadCreate.js').ThreadCreateAction);
|
|
50
|
+
this.register(require('./ThreadMembersUpdate.js').ThreadMembersUpdateAction);
|
|
51
|
+
this.register(require('./TypingStart.js').TypingStartAction);
|
|
52
|
+
this.register(require('./UserUpdate.js').UserUpdateAction);
|
|
55
53
|
}
|
|
56
54
|
|
|
57
55
|
register(Action) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class ChannelCreateAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class ChannelDeleteAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const { Action } = require('./Action');
|
|
4
|
-
const { createChannel } = require('../../util/Channels');
|
|
3
|
+
const { Action } = require('./Action.js');
|
|
4
|
+
const { createChannel } = require('../../util/Channels.js');
|
|
5
5
|
|
|
6
6
|
class ChannelUpdateAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildEmojiCreateAction extends Action {
|
|
7
7
|
handle(guild, createdEmoji) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildEmojiDeleteAction extends Action {
|
|
7
7
|
handle(emoji) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildEmojiUpdateAction extends Action {
|
|
7
7
|
handle(current, data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildMemberRemoveAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildMemberUpdateAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildRoleCreateAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildRoleDeleteAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildScheduledEventDeleteAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildScheduledEventUserAddAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildScheduledEventUserRemoveAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildStickerCreateAction extends Action {
|
|
7
7
|
handle(guild, createdSticker) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildStickerDeleteAction extends Action {
|
|
7
7
|
handle(sticker) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildStickerUpdateAction extends Action {
|
|
7
7
|
handle(current, data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class GuildUpdateAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
5
|
+
const { AutocompleteInteraction } = require('../../structures/AutocompleteInteraction.js');
|
|
6
|
+
const { ButtonInteraction } = require('../../structures/ButtonInteraction.js');
|
|
7
|
+
const { ChannelSelectMenuInteraction } = require('../../structures/ChannelSelectMenuInteraction.js');
|
|
8
|
+
const { ChatInputCommandInteraction } = require('../../structures/ChatInputCommandInteraction.js');
|
|
9
|
+
const { MentionableSelectMenuInteraction } = require('../../structures/MentionableSelectMenuInteraction.js');
|
|
10
|
+
const { MessageContextMenuCommandInteraction } = require('../../structures/MessageContextMenuCommandInteraction.js');
|
|
11
|
+
const { ModalSubmitInteraction } = require('../../structures/ModalSubmitInteraction.js');
|
|
12
|
+
const { RoleSelectMenuInteraction } = require('../../structures/RoleSelectMenuInteraction.js');
|
|
13
|
+
const { StringSelectMenuInteraction } = require('../../structures/StringSelectMenuInteraction.js');
|
|
14
|
+
const { UserContextMenuCommandInteraction } = require('../../structures/UserContextMenuCommandInteraction.js');
|
|
15
|
+
const { UserSelectMenuInteraction } = require('../../structures/UserSelectMenuInteraction.js');
|
|
16
|
+
const { Events } = require('../../util/Events.js');
|
|
17
17
|
|
|
18
18
|
class InteractionCreateAction extends Action {
|
|
19
19
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class MessageCreateAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class MessageDeleteAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const { Collection } = require('@discordjs/collection');
|
|
4
|
-
const { Action } = require('./Action');
|
|
5
|
-
const { Events } = require('../../util/Events');
|
|
4
|
+
const { Action } = require('./Action.js');
|
|
5
|
+
const { Events } = require('../../util/Events.js');
|
|
6
6
|
|
|
7
7
|
class MessageDeleteBulkAction extends Action {
|
|
8
8
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class MessagePollVoteAddAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class MessagePollVoteRemoveAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const { Action } = require('./Action');
|
|
4
|
-
const { Events } = require('../../util/Events');
|
|
5
|
-
const { Partials } = require('../../util/Partials');
|
|
3
|
+
const { Action } = require('./Action.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
|
+
const { Partials } = require('../../util/Partials.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
{ user_id: 'id',
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class MessageReactionRemoveAllAction extends Action {
|
|
7
7
|
handle(data) {
|
|
@@ -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.js');
|
|
4
|
+
const { Events } = require('../../util/Events.js');
|
|
5
5
|
|
|
6
6
|
class MessageReactionRemoveEmojiAction extends Action {
|
|
7
7
|
handle(data) {
|