@buape/carbon 0.2.0 → 0.3.1
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/dist/package.json +7 -2
- package/dist/src/abstracts/BaseComponentInteraction.d.ts +6 -1
- package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -1
- package/dist/src/abstracts/BaseComponentInteraction.js +12 -0
- package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -1
- package/dist/src/abstracts/BaseInteraction.d.ts +10 -1
- package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -1
- package/dist/src/abstracts/BaseInteraction.js +10 -1
- package/dist/src/abstracts/BaseInteraction.js.map +1 -1
- package/dist/src/classes/Client.d.ts.map +1 -1
- package/dist/src/classes/Client.js +21 -11
- package/dist/src/classes/Client.js.map +1 -1
- package/dist/src/classes/Embed.d.ts +60 -0
- package/dist/src/classes/Embed.d.ts.map +1 -0
- package/dist/src/classes/Embed.js +73 -0
- package/dist/src/classes/Embed.js.map +1 -0
- package/dist/src/index.d.ts +4 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internals/AutocompleteInteraction.d.ts +1 -1
- package/dist/src/internals/FieldsHandler.d.ts +27 -0
- package/dist/src/internals/FieldsHandler.d.ts.map +1 -0
- package/dist/src/internals/FieldsHandler.js +37 -0
- package/dist/src/internals/FieldsHandler.js.map +1 -0
- package/dist/src/internals/ModalInteraction.d.ts +3 -4
- package/dist/src/internals/ModalInteraction.d.ts.map +1 -1
- package/dist/src/internals/ModalInteraction.js +3 -10
- package/dist/src/internals/ModalInteraction.js.map +1 -1
- package/dist/src/internals/OptionsHandler.d.ts +33 -17
- package/dist/src/internals/OptionsHandler.d.ts.map +1 -1
- package/dist/src/internals/OptionsHandler.js +52 -58
- package/dist/src/internals/OptionsHandler.js.map +1 -1
- package/dist/src/utils.d.ts +3 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +54 -0
- package/dist/src/utils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -1
- package/.turbo/turbo-build.log +0 -5
- package/.turbo/turbo-dev.log +0 -8
- package/.turbo/turbo-docs.log +0 -12
- package/CHANGELOG.md +0 -44
- package/dist/src/abstracts/ButtonInteraction.d.ts +0 -8
- package/dist/src/abstracts/ButtonInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/ButtonInteraction.js +0 -18
- package/dist/src/abstracts/ButtonInteraction.js.map +0 -1
- package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts +0 -7
- package/dist/src/abstracts/ChannelSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/ChannelSelectMenuInteraction.js +0 -11
- package/dist/src/abstracts/ChannelSelectMenuInteraction.js.map +0 -1
- package/dist/src/abstracts/CommandHandler.d.ts +0 -6
- package/dist/src/abstracts/CommandHandler.d.ts.map +0 -1
- package/dist/src/abstracts/CommandHandler.js +0 -65
- package/dist/src/abstracts/CommandHandler.js.map +0 -1
- package/dist/src/abstracts/CommandInteraction.d.ts +0 -15
- package/dist/src/abstracts/CommandInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/CommandInteraction.js +0 -60
- package/dist/src/abstracts/CommandInteraction.js.map +0 -1
- package/dist/src/abstracts/ComponentHandler.d.ts +0 -6
- package/dist/src/abstracts/ComponentHandler.d.ts.map +0 -1
- package/dist/src/abstracts/ComponentHandler.js +0 -64
- package/dist/src/abstracts/ComponentHandler.js.map +0 -1
- package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts +0 -8
- package/dist/src/abstracts/MentionableSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/MentionableSelectMenuInteraction.js +0 -15
- package/dist/src/abstracts/MentionableSelectMenuInteraction.js.map +0 -1
- package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts +0 -8
- package/dist/src/abstracts/RoleSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/RoleSelectMenuInteraction.js +0 -14
- package/dist/src/abstracts/RoleSelectMenuInteraction.js.map +0 -1
- package/dist/src/abstracts/StringSelectMenuInteraction.d.ts +0 -8
- package/dist/src/abstracts/StringSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/StringSelectMenuInteraction.js +0 -14
- package/dist/src/abstracts/StringSelectMenuInteraction.js.map +0 -1
- package/dist/src/abstracts/UserSelectMenuInteraction.d.ts +0 -8
- package/dist/src/abstracts/UserSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/abstracts/UserSelectMenuInteraction.js +0 -14
- package/dist/src/abstracts/UserSelectMenuInteraction.js.map +0 -1
- package/dist/src/classes/Paginator.d.ts +0 -3
- package/dist/src/classes/Paginator.d.ts.map +0 -1
- package/dist/src/classes/Paginator.js +0 -3
- package/dist/src/classes/Paginator.js.map +0 -1
- package/dist/src/internals/ComponentHandler copy.d.ts +0 -17
- package/dist/src/internals/ComponentHandler copy.d.ts.map +0 -1
- package/dist/src/internals/ComponentHandler copy.js +0 -75
- package/dist/src/internals/ComponentHandler copy.js.map +0 -1
- package/dist/src/structures/AnySelectMenu.d.ts +0 -31
- package/dist/src/structures/AnySelectMenu.d.ts.map +0 -1
- package/dist/src/structures/AnySelectMenu.js +0 -19
- package/dist/src/structures/AnySelectMenu.js.map +0 -1
- package/dist/src/structures/AnySelectMenuInteraction.d.ts +0 -12
- package/dist/src/structures/AnySelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/structures/AnySelectMenuInteraction.js +0 -21
- package/dist/src/structures/AnySelectMenuInteraction.js.map +0 -1
- package/dist/src/structures/Base.d.ts +0 -10
- package/dist/src/structures/Base.d.ts.map +0 -1
- package/dist/src/structures/Base.js +0 -11
- package/dist/src/structures/Base.js.map +0 -1
- package/dist/src/structures/BaseCommand.d.ts +0 -64
- package/dist/src/structures/BaseCommand.d.ts.map +0 -1
- package/dist/src/structures/BaseCommand.js +0 -58
- package/dist/src/structures/BaseCommand.js.map +0 -1
- package/dist/src/structures/BaseComponent.d.ts +0 -34
- package/dist/src/structures/BaseComponent.d.ts.map +0 -1
- package/dist/src/structures/BaseComponent.js +0 -30
- package/dist/src/structures/BaseComponent.js.map +0 -1
- package/dist/src/structures/BaseComponentInteraction.d.ts +0 -9
- package/dist/src/structures/BaseComponentInteraction.d.ts.map +0 -1
- package/dist/src/structures/BaseComponentInteraction.js +0 -14
- package/dist/src/structures/BaseComponentInteraction.js.map +0 -1
- package/dist/src/structures/BaseInteraction.d.ts +0 -81
- package/dist/src/structures/BaseInteraction.d.ts.map +0 -1
- package/dist/src/structures/BaseInteraction.js +0 -99
- package/dist/src/structures/BaseInteraction.js.map +0 -1
- package/dist/src/structures/ButtonInteraction.d.ts +0 -8
- package/dist/src/structures/ButtonInteraction.d.ts.map +0 -1
- package/dist/src/structures/ButtonInteraction.js +0 -18
- package/dist/src/structures/ButtonInteraction.js.map +0 -1
- package/dist/src/structures/ChannelSelectMenuInteraction.d.ts +0 -7
- package/dist/src/structures/ChannelSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/structures/ChannelSelectMenuInteraction.js +0 -11
- package/dist/src/structures/ChannelSelectMenuInteraction.js.map +0 -1
- package/dist/src/structures/CommandHandler.d.ts +0 -6
- package/dist/src/structures/CommandHandler.d.ts.map +0 -1
- package/dist/src/structures/CommandHandler.js +0 -70
- package/dist/src/structures/CommandHandler.js.map +0 -1
- package/dist/src/structures/CommandInteraction.d.ts +0 -15
- package/dist/src/structures/CommandInteraction.d.ts.map +0 -1
- package/dist/src/structures/CommandInteraction.js +0 -60
- package/dist/src/structures/CommandInteraction.js.map +0 -1
- package/dist/src/structures/ComponentHandler.d.ts +0 -6
- package/dist/src/structures/ComponentHandler.d.ts.map +0 -1
- package/dist/src/structures/ComponentHandler.js +0 -64
- package/dist/src/structures/ComponentHandler.js.map +0 -1
- package/dist/src/structures/MentionableSelectMenuInteraction.d.ts +0 -8
- package/dist/src/structures/MentionableSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/structures/MentionableSelectMenuInteraction.js +0 -15
- package/dist/src/structures/MentionableSelectMenuInteraction.js.map +0 -1
- package/dist/src/structures/RoleSelectMenuInteraction.d.ts +0 -8
- package/dist/src/structures/RoleSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/structures/RoleSelectMenuInteraction.js +0 -14
- package/dist/src/structures/RoleSelectMenuInteraction.js.map +0 -1
- package/dist/src/structures/StringSelectMenuInteraction.d.ts +0 -8
- package/dist/src/structures/StringSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/structures/StringSelectMenuInteraction.js +0 -14
- package/dist/src/structures/StringSelectMenuInteraction.js.map +0 -1
- package/dist/src/structures/UserSelectMenuInteraction.d.ts +0 -8
- package/dist/src/structures/UserSelectMenuInteraction.d.ts.map +0 -1
- package/dist/src/structures/UserSelectMenuInteraction.js +0 -14
- package/dist/src/structures/UserSelectMenuInteraction.js.map +0 -1
- package/dist/src/types.d.ts +0 -31
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -33
- package/dist/src/types.js.map +0 -1
- package/docs/classes/AnySelectMenu.mdx +0 -114
- package/docs/classes/AnySelectMenuInteraction.mdx +0 -175
- package/docs/classes/AutocompleteInteraction.mdx +0 -166
- package/docs/classes/AutocompleteOptionsHandler.mdx +0 -243
- package/docs/classes/BaseChannel.mdx +0 -97
- package/docs/classes/BaseCommand.mdx +0 -61
- package/docs/classes/BaseComponent.mdx +0 -55
- package/docs/classes/BaseComponentInteraction.mdx +0 -160
- package/docs/classes/BaseGuildChannel.mdx +0 -262
- package/docs/classes/BaseGuildTextChannel.mdx +0 -360
- package/docs/classes/BaseInteraction.mdx +0 -137
- package/docs/classes/Button.mdx +0 -99
- package/docs/classes/ButtonInteraction.mdx +0 -155
- package/docs/classes/ChannelSelectMenu.mdx +0 -122
- package/docs/classes/ChannelSelectMenuInteraction.mdx +0 -171
- package/docs/classes/Client.mdx +0 -48
- package/docs/classes/Command.mdx +0 -111
- package/docs/classes/CommandHandler.mdx +0 -65
- package/docs/classes/CommandInteraction.mdx +0 -155
- package/docs/classes/CommandWithSubcommandGroups.mdx +0 -73
- package/docs/classes/CommandWithSubcommands.mdx +0 -76
- package/docs/classes/ComponentHandler.mdx +0 -49
- package/docs/classes/DmChannel.mdx +0 -118
- package/docs/classes/GroupDmChannel.mdx +0 -197
- package/docs/classes/Guild.mdx +0 -157
- package/docs/classes/GuildAnnouncementChannel.mdx +0 -377
- package/docs/classes/GuildCategoryChannel.mdx +0 -272
- package/docs/classes/GuildForumChannel.mdx +0 -333
- package/docs/classes/GuildMediaChannel.mdx +0 -327
- package/docs/classes/GuildStageChannel.mdx +0 -276
- package/docs/classes/GuildStageOrVoiceChannel.mdx +0 -292
- package/docs/classes/GuildTextChannel.mdx +0 -367
- package/docs/classes/GuildThreadChannel.mdx +0 -425
- package/docs/classes/GuildThreadOnlyChannel.mdx +0 -333
- package/docs/classes/GuildVoiceChannel.mdx +0 -276
- package/docs/classes/LinkButton.mdx +0 -84
- package/docs/classes/MentionableSelectMenu.mdx +0 -120
- package/docs/classes/MentionableSelectMenuInteraction.mdx +0 -171
- package/docs/classes/Message.mdx +0 -126
- package/docs/classes/OptionsHandler.mdx +0 -203
- package/docs/classes/PremiumButton.mdx +0 -84
- package/docs/classes/Role.mdx +0 -228
- package/docs/classes/RoleSelectMenu.mdx +0 -120
- package/docs/classes/RoleSelectMenuInteraction.mdx +0 -171
- package/docs/classes/Row.mdx +0 -88
- package/docs/classes/StringSelectMenu.mdx +0 -120
- package/docs/classes/StringSelectMenuInteraction.mdx +0 -171
- package/docs/classes/User.mdx +0 -119
- package/docs/classes/UserSelectMenu.mdx +0 -120
- package/docs/classes/UserSelectMenuInteraction.mdx +0 -171
- package/docs/enumerations/ClientMode.mdx +0 -16
- package/docs/functions/channelFactory.mdx +0 -16
- package/docs/index.mdx +0 -83
- package/docs/type-aliases/AnySelectMenuComponentType.mdx +0 -5
- package/docs/type-aliases/ClientOptions.mdx +0 -20
- package/docs/type-aliases/CommandOptions.mdx +0 -5
- package/docs/type-aliases/ComponentAdditionalData.mdx +0 -9
- package/docs/type-aliases/InteractionFileData.mdx +0 -15
- package/docs/type-aliases/InteractionReplyData.mdx +0 -14
- package/docs/type-aliases/InteractionReplyOptions.mdx +0 -13
- package/docs/type-aliases/RawOptions.mdx +0 -9
- package/docs/type-aliases/meta.json +0 -3
- package/src/README.md +0 -7
- package/src/abstracts/AnySelectMenu.ts +0 -63
- package/src/abstracts/AnySelectMenuInteraction.ts +0 -29
- package/src/abstracts/Base.ts +0 -12
- package/src/abstracts/BaseChannel.ts +0 -73
- package/src/abstracts/BaseCommand.ts +0 -89
- package/src/abstracts/BaseComponent.ts +0 -49
- package/src/abstracts/BaseComponentInteraction.ts +0 -19
- package/src/abstracts/BaseGuildChannel.ts +0 -152
- package/src/abstracts/BaseGuildTextChannel.ts +0 -77
- package/src/abstracts/BaseInteraction.ts +0 -209
- package/src/abstracts/GuildThreadOnlyChannel.ts +0 -71
- package/src/classes/Button.ts +0 -95
- package/src/classes/ChannelSelectMenu.ts +0 -21
- package/src/classes/Client.ts +0 -277
- package/src/classes/Command.ts +0 -53
- package/src/classes/CommandWithSubcommandGroups.ts +0 -47
- package/src/classes/CommandWithSubcommands.ts +0 -35
- package/src/classes/MentionableSelectMenu.ts +0 -19
- package/src/classes/Modal.ts +0 -38
- package/src/classes/RoleSelectMenu.ts +0 -19
- package/src/classes/Row.ts +0 -50
- package/src/classes/StringSelectMenu.ts +0 -19
- package/src/classes/TextInput.ts +0 -65
- package/src/classes/UserSelectMenu.ts +0 -19
- package/src/factories/channelFactory.ts +0 -43
- package/src/index.ts +0 -62
- package/src/internals/AutocompleteInteraction.ts +0 -107
- package/src/internals/ButtonInteraction.ts +0 -26
- package/src/internals/ChannelSelectMenuInteraction.ts +0 -15
- package/src/internals/CommandHandler.ts +0 -127
- package/src/internals/CommandInteraction.ts +0 -49
- package/src/internals/ComponentHandler.ts +0 -92
- package/src/internals/MentionableSelectMenuInteraction.ts +0 -21
- package/src/internals/ModalHandler.ts +0 -27
- package/src/internals/ModalInteraction.ts +0 -25
- package/src/internals/OptionsHandler.ts +0 -148
- package/src/internals/RoleSelectMenuInteraction.ts +0 -20
- package/src/internals/StringSelectMenuInteraction.ts +0 -20
- package/src/internals/UserSelectMenuInteraction.ts +0 -20
- package/src/structures/DmChannel.ts +0 -31
- package/src/structures/GroupDmChannel.ts +0 -132
- package/src/structures/Guild.ts +0 -154
- package/src/structures/GuildAnnouncementChannel.ts +0 -20
- package/src/structures/GuildCategoryChannel.ts +0 -16
- package/src/structures/GuildForumChannel.ts +0 -20
- package/src/structures/GuildMediaChannel.ts +0 -13
- package/src/structures/GuildMember.ts +0 -231
- package/src/structures/GuildStageOrVoiceChannel.ts +0 -46
- package/src/structures/GuildTextChannel.ts +0 -21
- package/src/structures/GuildThreadChannel.ts +0 -150
- package/src/structures/Message.ts +0 -124
- package/src/structures/Role.ts +0 -201
- package/src/structures/User.ts +0 -153
- package/src/utils.ts +0 -13
- package/tests/index.test.ts +0 -4
- package/tsconfig.json +0 -12
- package/typedoc.json +0 -9
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Base.d.ts","sourceRoot":"","sources":["../../../src/structures/Base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD;;;GAGG;AACH,qBAAa,IAAI;IAChB,MAAM,EAAE,MAAM,CAAA;gBACF,MAAM,EAAE,MAAM;CAG1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Base.js","sourceRoot":"","sources":["../../../src/structures/Base.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,OAAO,IAAI;IAChB,MAAM,CAAQ;IACd,YAAY,MAAc;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACrB,CAAC;CACD"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { ApplicationCommandType, RESTPostAPIApplicationCommandsJSONBody } from "discord-api-types/v10";
|
|
2
|
-
import { ApplicationIntegrationType, InteractionContextType } from "../index.js";
|
|
3
|
-
import type { BaseComponent } from "./BaseComponent.js";
|
|
4
|
-
import type { Paginator } from "../classes/Paginator.js";
|
|
5
|
-
/**
|
|
6
|
-
* Represents the base data of a command that the user creates
|
|
7
|
-
* @abstract
|
|
8
|
-
*/
|
|
9
|
-
export declare abstract class BaseCommand {
|
|
10
|
-
/**
|
|
11
|
-
* The name of the command (e.g. "ping" for /ping)
|
|
12
|
-
*/
|
|
13
|
-
abstract name: string;
|
|
14
|
-
/**
|
|
15
|
-
* A description of the command
|
|
16
|
-
*/
|
|
17
|
-
abstract description: string;
|
|
18
|
-
/**
|
|
19
|
-
* Whether the command response should be automatically deferred
|
|
20
|
-
*/
|
|
21
|
-
defer: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Whether the command response should be ephemeral
|
|
24
|
-
*/
|
|
25
|
-
ephemeral: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* The type of the command
|
|
28
|
-
*/
|
|
29
|
-
abstract type: ApplicationCommandType;
|
|
30
|
-
/**
|
|
31
|
-
* The places this command can be used in
|
|
32
|
-
* @beta API types are not finalized
|
|
33
|
-
*/
|
|
34
|
-
integrationTypes: ApplicationIntegrationType[];
|
|
35
|
-
/**
|
|
36
|
-
* The contexts this command can be used in
|
|
37
|
-
* @beta API types are not finalized
|
|
38
|
-
*/
|
|
39
|
-
contexts: InteractionContextType[];
|
|
40
|
-
/**
|
|
41
|
-
* All the components that the command is able to use.
|
|
42
|
-
* You mount these here so the handler can access them
|
|
43
|
-
*/
|
|
44
|
-
components?: BaseComponent[];
|
|
45
|
-
/**
|
|
46
|
-
* All the paginators that the command is able to use.
|
|
47
|
-
* You mount these here so the handler can access them
|
|
48
|
-
*/
|
|
49
|
-
paginators?: Paginator[];
|
|
50
|
-
/**
|
|
51
|
-
* Serializes the command into a JSON object that can be sent to Discord
|
|
52
|
-
* @internal
|
|
53
|
-
*/
|
|
54
|
-
serialize(): RESTPostAPIApplicationCommandsJSONBody & {
|
|
55
|
-
integration_types: ApplicationIntegrationType[];
|
|
56
|
-
contexts: InteractionContextType[];
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Serializes the options of the command into a JSON object that can be sent to Discord
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
62
|
-
abstract serializeOptions(): RESTPostAPIApplicationCommandsJSONBody["options"];
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=BaseCommand.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseCommand.d.ts","sourceRoot":"","sources":["../../../src/structures/BaseCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,sCAAsC,EACtC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD;;;GAGG;AACH,8BAAsB,WAAW;IAChC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,KAAK,UAAQ;IACb;;OAEG;IACH,SAAS,UAAQ;IACjB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAA;IACrC;;;OAGG;IACH,gBAAgB,EAAE,0BAA0B,EAAE,CAG7C;IACD;;;OAGG;IACH,QAAQ,EAAE,sBAAsB,EAAE,CAIjC;IAED;;;OAGG;IACH,UAAU,CAAC,EAAE,aAAa,EAAE,CAAK;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,EAAE,CAAK;IAE7B;;;OAGG;IACH,SAAS;2BAEY,0BAA0B,EAAE;kBACrC,sBAAsB,EAAE;;IAapC;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,IAAI,sCAAsC,CAAC,SAAS,CAAC;CAC9E"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { ApplicationIntegrationType, InteractionContextType } from "../index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Represents the base data of a command that the user creates
|
|
4
|
-
* @abstract
|
|
5
|
-
*/
|
|
6
|
-
export class BaseCommand {
|
|
7
|
-
/**
|
|
8
|
-
* Whether the command response should be automatically deferred
|
|
9
|
-
*/
|
|
10
|
-
defer = false;
|
|
11
|
-
/**
|
|
12
|
-
* Whether the command response should be ephemeral
|
|
13
|
-
*/
|
|
14
|
-
ephemeral = false;
|
|
15
|
-
/**
|
|
16
|
-
* The places this command can be used in
|
|
17
|
-
* @beta API types are not finalized
|
|
18
|
-
*/
|
|
19
|
-
integrationTypes = [
|
|
20
|
-
ApplicationIntegrationType.GuildInstall,
|
|
21
|
-
ApplicationIntegrationType.UserInstall
|
|
22
|
-
];
|
|
23
|
-
/**
|
|
24
|
-
* The contexts this command can be used in
|
|
25
|
-
* @beta API types are not finalized
|
|
26
|
-
*/
|
|
27
|
-
contexts = [
|
|
28
|
-
InteractionContextType.Guild,
|
|
29
|
-
InteractionContextType.BotDM,
|
|
30
|
-
InteractionContextType.PrivateChannel
|
|
31
|
-
];
|
|
32
|
-
/**
|
|
33
|
-
* All the components that the command is able to use.
|
|
34
|
-
* You mount these here so the handler can access them
|
|
35
|
-
*/
|
|
36
|
-
components = [];
|
|
37
|
-
/**
|
|
38
|
-
* All the paginators that the command is able to use.
|
|
39
|
-
* You mount these here so the handler can access them
|
|
40
|
-
*/
|
|
41
|
-
paginators = [];
|
|
42
|
-
/**
|
|
43
|
-
* Serializes the command into a JSON object that can be sent to Discord
|
|
44
|
-
* @internal
|
|
45
|
-
*/
|
|
46
|
-
serialize() {
|
|
47
|
-
const data = {
|
|
48
|
-
name: this.name,
|
|
49
|
-
description: this.description,
|
|
50
|
-
type: this.type,
|
|
51
|
-
options: this.serializeOptions(),
|
|
52
|
-
integration_types: this.integrationTypes,
|
|
53
|
-
contexts: this.contexts
|
|
54
|
-
};
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=BaseCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseCommand.js","sourceRoot":"","sources":["../../../src/structures/BaseCommand.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAIhF;;;GAGG;AACH,MAAM,OAAgB,WAAW;IAShC;;OAEG;IACH,KAAK,GAAG,KAAK,CAAA;IACb;;OAEG;IACH,SAAS,GAAG,KAAK,CAAA;IAKjB;;;OAGG;IACH,gBAAgB,GAAiC;QAChD,0BAA0B,CAAC,YAAY;QACvC,0BAA0B,CAAC,WAAW;KACtC,CAAA;IACD;;;OAGG;IACH,QAAQ,GAA6B;QACpC,sBAAsB,CAAC,KAAK;QAC5B,sBAAsB,CAAC,KAAK;QAC5B,sBAAsB,CAAC,cAAc;KACrC,CAAA;IAED;;;OAGG;IACH,UAAU,GAAqB,EAAE,CAAA;IACjC;;;OAGG;IACH,UAAU,GAAiB,EAAE,CAAA;IAE7B;;;OAGG;IACH,SAAS;QACR,MAAM,IAAI,GAGN;YACH,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE;YAChC,iBAAiB,EAAE,IAAI,CAAC,gBAAgB;YACxC,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACvB,CAAA;QAED,OAAO,IAAI,CAAA;IACZ,CAAC;CAOD"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { APIBaseComponent, ComponentType } from "discord-api-types/v10";
|
|
2
|
-
export type ComponentAdditionalData = {
|
|
3
|
-
[key: string]: string | number | boolean;
|
|
4
|
-
};
|
|
5
|
-
export declare abstract class BaseComponent {
|
|
6
|
-
constructor(data?: {
|
|
7
|
-
additionalData?: ComponentAdditionalData;
|
|
8
|
-
});
|
|
9
|
-
/**
|
|
10
|
-
* Whether the component response should be automatically deferred
|
|
11
|
-
*/
|
|
12
|
-
defer: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Whether the component response should be ephemeral
|
|
15
|
-
*/
|
|
16
|
-
ephemeral: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* The type of the component
|
|
19
|
-
*/
|
|
20
|
-
abstract type: ComponentType;
|
|
21
|
-
/**
|
|
22
|
-
* The custom ID of the component
|
|
23
|
-
*/
|
|
24
|
-
abstract customId: string;
|
|
25
|
-
additionalData: ComponentAdditionalData | null;
|
|
26
|
-
/**
|
|
27
|
-
* Create a custom ID to use for this component that embeds additional data that you want to be handed
|
|
28
|
-
* @param additionalData The additional data that you want to be passed in this component's custom ID
|
|
29
|
-
* @returns The custom ID to use
|
|
30
|
-
*/
|
|
31
|
-
createId: (additionalData: ComponentAdditionalData | null) => string;
|
|
32
|
-
abstract serialize: () => APIBaseComponent<typeof this.type>;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=BaseComponent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseComponent.d.ts","sourceRoot":"","sources":["../../../src/structures/BaseComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAE5E,MAAM,MAAM,uBAAuB,GAAG;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;CACxC,CAAA;AAED,8BAAsB,aAAa;gBACtB,IAAI,CAAC,EAAE;QAClB,cAAc,CAAC,EAAE,uBAAuB,CAAA;KACxC;IAID;;OAEG;IACH,KAAK,UAAQ;IACb;;OAEG;IACH,SAAS,UAAQ;IAEjB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;IAC5B;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IAEzB,cAAc,EAAE,uBAAuB,GAAG,IAAI,CAAO;IAErD;;;;OAIG;IACI,QAAQ,6DAOd;IAED,QAAQ,CAAC,SAAS,EAAE,MAAM,gBAAgB,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAA;CAC5D"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export class BaseComponent {
|
|
2
|
-
constructor(data) {
|
|
3
|
-
if (data?.additionalData)
|
|
4
|
-
this.additionalData = data.additionalData;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Whether the component response should be automatically deferred
|
|
8
|
-
*/
|
|
9
|
-
defer = false;
|
|
10
|
-
/**
|
|
11
|
-
* Whether the component response should be ephemeral
|
|
12
|
-
*/
|
|
13
|
-
ephemeral = false;
|
|
14
|
-
additionalData = null;
|
|
15
|
-
/**
|
|
16
|
-
* Create a custom ID to use for this component that embeds additional data that you want to be handed
|
|
17
|
-
* @param additionalData The additional data that you want to be passed in this component's custom ID
|
|
18
|
-
* @returns The custom ID to use
|
|
19
|
-
*/
|
|
20
|
-
createId = (additionalData) => {
|
|
21
|
-
if (!additionalData)
|
|
22
|
-
return this.customId;
|
|
23
|
-
// id:arg1=1;arg2=2
|
|
24
|
-
const id = `${this.customId}:${Object.entries(additionalData)
|
|
25
|
-
.map(([key, value]) => `${key}=${value}`)
|
|
26
|
-
.join(";")}`;
|
|
27
|
-
return id;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=BaseComponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseComponent.js","sourceRoot":"","sources":["../../../src/structures/BaseComponent.ts"],"names":[],"mappings":"AAMA,MAAM,OAAgB,aAAa;IAClC,YAAY,IAEX;QACA,IAAI,IAAI,EAAE,cAAc;YAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAA;IACpE,CAAC;IAED;;OAEG;IACH,KAAK,GAAG,KAAK,CAAA;IACb;;OAEG;IACH,SAAS,GAAG,KAAK,CAAA;IAWjB,cAAc,GAAmC,IAAI,CAAA;IAErD;;;;OAIG;IACI,QAAQ,GAAG,CAAC,cAA0C,EAAE,EAAE;QAChE,IAAI,CAAC,cAAc;YAAE,OAAO,IAAI,CAAC,QAAQ,CAAA;QACzC,mBAAmB;QACnB,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC;aAC3D,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;aACxC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAA;QACb,OAAO,EAAE,CAAA;IACV,CAAC,CAAA;CAGD"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { APIMessageComponentInteraction, ComponentType } from "discord-api-types/v10";
|
|
2
|
-
import { BaseInteraction } from "./BaseInteraction.js";
|
|
3
|
-
import type { Client } from "../classes/Client.js";
|
|
4
|
-
export declare class BaseComponentInteraction extends BaseInteraction {
|
|
5
|
-
customId: string;
|
|
6
|
-
componentType: ComponentType;
|
|
7
|
-
constructor(client: Client, data: APIMessageComponentInteraction);
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=BaseComponentInteraction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseComponentInteraction.d.ts","sourceRoot":"","sources":["../../../src/structures/BaseComponentInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,8BAA8B,EAC9B,aAAa,EACb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,qBAAa,wBAAyB,SAAQ,eAAe;IAC5D,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,aAAa,CAAA;gBAChB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,8BAA8B;CAOhE"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { splitCustomId } from "../utils.js";
|
|
2
|
-
import { BaseInteraction } from "./BaseInteraction.js";
|
|
3
|
-
export class BaseComponentInteraction extends BaseInteraction {
|
|
4
|
-
customId;
|
|
5
|
-
componentType;
|
|
6
|
-
constructor(client, data) {
|
|
7
|
-
super(client, data);
|
|
8
|
-
if (!data.data)
|
|
9
|
-
throw new Error("Invalid interaction data was used to create this class");
|
|
10
|
-
this.customId = splitCustomId(data.data.custom_id)[0];
|
|
11
|
-
this.componentType = data.data.component_type;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=BaseComponentInteraction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseComponentInteraction.js","sourceRoot":"","sources":["../../../src/structures/BaseComponentInteraction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAGtD,MAAM,OAAO,wBAAyB,SAAQ,eAAe;IAC5D,QAAQ,CAAQ;IAChB,aAAa,CAAe;IAC5B,YAAY,MAAc,EAAE,IAAoC;QAC/D,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACnB,IAAI,CAAC,IAAI,CAAC,IAAI;YACb,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAA;QAC1E,IAAI,CAAC,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;QACrD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,CAAA;IAC9C,CAAC;CACD"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { type APIInteraction, type InteractionType } from "discord-api-types/v10";
|
|
2
|
-
import type { Client } from "../classes/Client.js";
|
|
3
|
-
import { Base } from "./Base.js";
|
|
4
|
-
import type { Row } from "../classes/Row.js";
|
|
5
|
-
/**
|
|
6
|
-
* The data to reply to an interaction
|
|
7
|
-
*/
|
|
8
|
-
export type InteractionReplyData = {
|
|
9
|
-
/**
|
|
10
|
-
* The content of the message
|
|
11
|
-
*/
|
|
12
|
-
content?: string;
|
|
13
|
-
/**
|
|
14
|
-
* The components to send in the message, listed in rows
|
|
15
|
-
*/
|
|
16
|
-
components?: Row[];
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Additional options for replying to an interaction
|
|
20
|
-
*/
|
|
21
|
-
export type InteractionReplyOptions = {
|
|
22
|
-
/**
|
|
23
|
-
* The files to send in the interaction
|
|
24
|
-
*/
|
|
25
|
-
files?: InteractionFileData[];
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* The data for a file to send in an interaction
|
|
29
|
-
*/
|
|
30
|
-
export type InteractionFileData = {
|
|
31
|
-
/**
|
|
32
|
-
* The name of the file that will be given to Discord
|
|
33
|
-
*/
|
|
34
|
-
name: string;
|
|
35
|
-
/**
|
|
36
|
-
* The data of the file in a Blob
|
|
37
|
-
*/
|
|
38
|
-
data: Blob;
|
|
39
|
-
/**
|
|
40
|
-
* The alt text of the file, shown for accessibility
|
|
41
|
-
* @alpha This isn't implemented yet
|
|
42
|
-
*/
|
|
43
|
-
description?: string;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* This is the base type interaction, all interaction types extend from this
|
|
47
|
-
* @abstract
|
|
48
|
-
*/
|
|
49
|
-
export declare abstract class BaseInteraction extends Base {
|
|
50
|
-
/**
|
|
51
|
-
* The type of interaction
|
|
52
|
-
*/
|
|
53
|
-
type: InteractionType;
|
|
54
|
-
/**
|
|
55
|
-
* The raw data of the interaction
|
|
56
|
-
*/
|
|
57
|
-
rawData: APIInteraction;
|
|
58
|
-
/**
|
|
59
|
-
* The user who sent the interaction
|
|
60
|
-
*/
|
|
61
|
-
userId: string | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Whether the interaction is deferred already
|
|
64
|
-
* @internal
|
|
65
|
-
*/
|
|
66
|
-
_deferred: boolean;
|
|
67
|
-
constructor(client: Client, data: APIInteraction);
|
|
68
|
-
/**
|
|
69
|
-
* Reply to an interaction.
|
|
70
|
-
* If the interaction is deferred, this will edit the original response.
|
|
71
|
-
* @param data The response data
|
|
72
|
-
*/
|
|
73
|
-
reply(data: InteractionReplyData, options?: InteractionReplyOptions): Promise<void>;
|
|
74
|
-
/**
|
|
75
|
-
* Defer the interaction response. This is used automatically by commands that are set to defer.
|
|
76
|
-
* If the interaction is already deferred, this will do nothing.
|
|
77
|
-
* @internal
|
|
78
|
-
*/
|
|
79
|
-
defer(): Promise<void>;
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=BaseInteraction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInteraction.d.ts","sourceRoot":"","sources":["../../../src/structures/BaseInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,cAAc,EAEnB,KAAK,eAAe,EAEpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAE5C;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,GAAG,EAAE,CAAA;CAClB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACrC;;OAEG;IACH,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAA;CAC7B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IACV;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;GAGG;AACH,8BAAsB,eAAgB,SAAQ,IAAI;IACjD;;OAEG;IACH,IAAI,EAAE,eAAe,CAAA;IACrB;;OAEG;IACH,OAAO,EAAE,cAAc,CAAA;IACvB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAE1B;;;OAGG;IACH,SAAS,UAAQ;gBAEL,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc;IAQhD;;;;OAIG;IACG,KAAK,CACV,IAAI,EAAE,oBAAoB,EAC1B,OAAO,GAAE,uBAA4B;IAqDtC;;;;OAIG;IACG,KAAK;CAYX"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { InteractionResponseType, Routes } from "discord-api-types/v10";
|
|
2
|
-
import { Base } from "./Base.js";
|
|
3
|
-
/**
|
|
4
|
-
* This is the base type interaction, all interaction types extend from this
|
|
5
|
-
* @abstract
|
|
6
|
-
*/
|
|
7
|
-
export class BaseInteraction extends Base {
|
|
8
|
-
/**
|
|
9
|
-
* The type of interaction
|
|
10
|
-
*/
|
|
11
|
-
type;
|
|
12
|
-
/**
|
|
13
|
-
* The raw data of the interaction
|
|
14
|
-
*/
|
|
15
|
-
rawData;
|
|
16
|
-
/**
|
|
17
|
-
* The user who sent the interaction
|
|
18
|
-
*/
|
|
19
|
-
userId;
|
|
20
|
-
/**
|
|
21
|
-
* Whether the interaction is deferred already
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
_deferred = false;
|
|
25
|
-
constructor(client, data) {
|
|
26
|
-
super(client);
|
|
27
|
-
this.rawData = data;
|
|
28
|
-
this.type = data.type;
|
|
29
|
-
this.userId =
|
|
30
|
-
this.rawData.user?.id || this.rawData.member?.user.id || undefined;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Reply to an interaction.
|
|
34
|
-
* If the interaction is deferred, this will edit the original response.
|
|
35
|
-
* @param data The response data
|
|
36
|
-
*/
|
|
37
|
-
async reply(data, options = {}) {
|
|
38
|
-
if (this._deferred) {
|
|
39
|
-
console.log(data);
|
|
40
|
-
const response = await fetch(`https://discord.com/api/v10/webhooks/${this.client.options.clientId}/${this.rawData.token}`, {
|
|
41
|
-
method: "PATCH",
|
|
42
|
-
body: JSON.stringify({
|
|
43
|
-
...data,
|
|
44
|
-
components: data.components?.map((row) => row.serialize())
|
|
45
|
-
}),
|
|
46
|
-
headers: {
|
|
47
|
-
"Content-Type": "application/json"
|
|
48
|
-
}
|
|
49
|
-
}).catch((err) => {
|
|
50
|
-
console.error(err);
|
|
51
|
-
throw err;
|
|
52
|
-
});
|
|
53
|
-
console.log(response.json(), response.status);
|
|
54
|
-
// await this.client.rest.patch(
|
|
55
|
-
// Routes.webhookMessage(
|
|
56
|
-
// this.client.options.clientId,
|
|
57
|
-
// this.rawData.token,
|
|
58
|
-
// "@original"
|
|
59
|
-
// ),
|
|
60
|
-
// {
|
|
61
|
-
// body: {
|
|
62
|
-
// ...data,
|
|
63
|
-
// components: data.components?.map((row) => row.serialize())
|
|
64
|
-
// },
|
|
65
|
-
// files: options.files
|
|
66
|
-
// }
|
|
67
|
-
// )
|
|
68
|
-
console.log("reply done");
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
await this.client.rest.post(Routes.interactionCallback(this.rawData.id, this.rawData.token), {
|
|
72
|
-
body: {
|
|
73
|
-
type: InteractionResponseType.ChannelMessageWithSource,
|
|
74
|
-
data: {
|
|
75
|
-
...data,
|
|
76
|
-
components: data.components?.map((row) => row.serialize())
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
files: options.files
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Defer the interaction response. This is used automatically by commands that are set to defer.
|
|
85
|
-
* If the interaction is already deferred, this will do nothing.
|
|
86
|
-
* @internal
|
|
87
|
-
*/
|
|
88
|
-
async defer() {
|
|
89
|
-
if (this._deferred)
|
|
90
|
-
return;
|
|
91
|
-
this._deferred = true;
|
|
92
|
-
await this.client.rest.post(Routes.interactionCallback(this.rawData.id, this.rawData.token), {
|
|
93
|
-
body: {
|
|
94
|
-
type: InteractionResponseType.DeferredChannelMessageWithSource
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
//# sourceMappingURL=BaseInteraction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInteraction.js","sourceRoot":"","sources":["../../../src/structures/BaseInteraction.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type APIMessageComponentButtonInteraction } from "discord-api-types/v10";
|
|
2
|
-
import type { Client } from "../classes/Client.js";
|
|
3
|
-
import { BaseComponentInteraction } from "./BaseComponentInteraction.js";
|
|
4
|
-
export declare class ButtonInteraction extends BaseComponentInteraction {
|
|
5
|
-
customId: string;
|
|
6
|
-
constructor(client: Client, data: APIMessageComponentButtonInteraction);
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=ButtonInteraction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonInteraction.d.ts","sourceRoot":"","sources":["../../../src/structures/ButtonInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,KAAK,oCAAoC,EACzC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAGxE,qBAAa,iBAAkB,SAAQ,wBAAwB;IAC9D,QAAQ,EAAE,MAAM,CAEZ;gBACQ,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,oCAAoC;CAWtE"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ComponentType, InteractionType } from "discord-api-types/v10";
|
|
2
|
-
import { BaseComponentInteraction } from "./BaseComponentInteraction.js";
|
|
3
|
-
import { splitCustomId } from "../utils.js";
|
|
4
|
-
export class ButtonInteraction extends BaseComponentInteraction {
|
|
5
|
-
customId = splitCustomId(this.rawData.data.custom_id)[0];
|
|
6
|
-
constructor(client, data) {
|
|
7
|
-
super(client, data);
|
|
8
|
-
if (!data.data)
|
|
9
|
-
throw new Error("Invalid interaction data was used to create this class");
|
|
10
|
-
if (data.type !== InteractionType.MessageComponent) {
|
|
11
|
-
throw new Error("Invalid interaction type was used to create this class");
|
|
12
|
-
}
|
|
13
|
-
if (data.data.component_type !== ComponentType.Button) {
|
|
14
|
-
throw new Error("Invalid component type was used to create this class");
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=ButtonInteraction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonInteraction.js","sourceRoot":"","sources":["../../../src/structures/ButtonInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,eAAe,EAEf,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,OAAO,iBAAkB,SAAQ,wBAAwB;IAC9D,QAAQ,GAAW,aAAa,CAC9B,IAAI,CAAC,OAAO,CAAC,IAAwC,CAAC,SAAS,CAChE,CAAC,CAAC,CAAC,CAAA;IACJ,YAAY,MAAc,EAAE,IAA0C;QACrE,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACnB,IAAI,CAAC,IAAI,CAAC,IAAI;YACb,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAA;QAC1E,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe,CAAC,gBAAgB,EAAE,CAAC;YACpD,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAA;QAC1E,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,KAAK,aAAa,CAAC,MAAM,EAAE,CAAC;YACvD,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACxE,CAAC;IACF,CAAC;CACD"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type APIMessageComponentSelectMenuInteraction } from "discord-api-types/v10";
|
|
2
|
-
import type { Client } from "../classes/Client.js";
|
|
3
|
-
import { AnySelectMenuInteraction } from "./AnySelectMenuInteraction.js";
|
|
4
|
-
export declare class ChannelSelectMenuInteraction extends AnySelectMenuInteraction {
|
|
5
|
-
constructor(client: Client, data: APIMessageComponentSelectMenuInteraction);
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=ChannelSelectMenuInteraction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/structures/ChannelSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAE7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,qBAAa,4BAA6B,SAAQ,wBAAwB;gBAC7D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,wCAAwC;CAM1E"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from "discord-api-types/v10";
|
|
2
|
-
import { AnySelectMenuInteraction } from "./AnySelectMenuInteraction.js";
|
|
3
|
-
export class ChannelSelectMenuInteraction extends AnySelectMenuInteraction {
|
|
4
|
-
constructor(client, data) {
|
|
5
|
-
super(client, data);
|
|
6
|
-
if (data.data.component_type !== ComponentType.ChannelSelect) {
|
|
7
|
-
throw new Error("Invalid component type was used to create this class");
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=ChannelSelectMenuInteraction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/structures/ChannelSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExE,MAAM,OAAO,4BAA6B,SAAQ,wBAAwB;IACzE,YAAY,MAAc,EAAE,IAA8C;QACzE,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QACnB,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,KAAK,aAAa,CAAC,aAAa,EAAE,CAAC;YAC9D,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACxE,CAAC;IACF,CAAC;CACD"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Base } from "./Base.js";
|
|
2
|
-
import { type APIApplicationCommandInteraction } from "discord-api-types/v10";
|
|
3
|
-
export declare class CommandHandler extends Base {
|
|
4
|
-
handleInteraction(rawInteraction: APIApplicationCommandInteraction): Promise<false | void>;
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=CommandHandler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandHandler.d.ts","sourceRoot":"","sources":["../../../src/structures/CommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAKN,KAAK,gCAAgC,EACrC,MAAM,uBAAuB,CAAA;AAM9B,qBAAa,cAAe,SAAQ,IAAI;IACjC,iBAAiB,CAAC,cAAc,EAAE,gCAAgC;CAyFxE"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Base } from "./Base.js";
|
|
2
|
-
import { ApplicationCommandOptionType, ApplicationCommandType } from "discord-api-types/v10";
|
|
3
|
-
import { Command } from "../classes/Command.js";
|
|
4
|
-
import { CommandWithSubcommandGroups } from "../classes/CommandWithSubcommandGroups.js";
|
|
5
|
-
import { CommandWithSubcommands } from "../classes/CommandWithSubcommands.js";
|
|
6
|
-
import { CommandInteraction } from "./CommandInteraction.js";
|
|
7
|
-
export class CommandHandler extends Base {
|
|
8
|
-
async handleInteraction(rawInteraction) {
|
|
9
|
-
const command = this.client.commands.find((x) => x.name === rawInteraction.data.name);
|
|
10
|
-
if (!command)
|
|
11
|
-
return false;
|
|
12
|
-
const interaction = new CommandInteraction(this.client, rawInteraction, command);
|
|
13
|
-
if (command instanceof Command) {
|
|
14
|
-
console.log(1);
|
|
15
|
-
if (command.defer) {
|
|
16
|
-
await interaction.defer();
|
|
17
|
-
}
|
|
18
|
-
console.log(2);
|
|
19
|
-
await command.run(interaction).then(() => {
|
|
20
|
-
console.log("2 done");
|
|
21
|
-
});
|
|
22
|
-
console.log(3);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
if (command instanceof CommandWithSubcommandGroups) {
|
|
26
|
-
if (rawInteraction.data.type !== ApplicationCommandType.ChatInput) {
|
|
27
|
-
return await interaction.reply({
|
|
28
|
-
content: "Subcommand groups must be used with ChatInput"
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
const data = rawInteraction.data;
|
|
32
|
-
const subcommandGroupName = data.options?.find((x) => x.type === ApplicationCommandOptionType.SubcommandGroup)?.name;
|
|
33
|
-
if (!subcommandGroupName)
|
|
34
|
-
return false;
|
|
35
|
-
const subcommandGroup = command.subcommandGroups.find((x) => x.name === subcommandGroupName);
|
|
36
|
-
if (!subcommandGroup)
|
|
37
|
-
return false;
|
|
38
|
-
const subcommandName = (data.options?.find((x) => x.type === ApplicationCommandOptionType.SubcommandGroup)).options?.find((x) => x.type === ApplicationCommandOptionType.Subcommand)?.name;
|
|
39
|
-
if (!subcommandName)
|
|
40
|
-
return false;
|
|
41
|
-
const subcommand = subcommandGroup.subcommands.find((x) => x.name === subcommandName);
|
|
42
|
-
if (!subcommand)
|
|
43
|
-
return false;
|
|
44
|
-
if (subcommand.defer) {
|
|
45
|
-
await interaction.defer();
|
|
46
|
-
}
|
|
47
|
-
return await subcommand.run(interaction);
|
|
48
|
-
}
|
|
49
|
-
if (command instanceof CommandWithSubcommands) {
|
|
50
|
-
if (rawInteraction.data.type !== ApplicationCommandType.ChatInput) {
|
|
51
|
-
return interaction.reply({
|
|
52
|
-
content: "Subcommands must be used with ChatInput"
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
const data = rawInteraction.data;
|
|
56
|
-
const subcommand = command.subcommands.find((x) => x.name === data.options?.[0]?.name);
|
|
57
|
-
if (!subcommand)
|
|
58
|
-
return false;
|
|
59
|
-
if (subcommand.defer) {
|
|
60
|
-
await interaction.defer();
|
|
61
|
-
}
|
|
62
|
-
return await subcommand.run(interaction);
|
|
63
|
-
}
|
|
64
|
-
console.error(`Command ${command.name} is not a valid command type`);
|
|
65
|
-
console.debug(rawInteraction.data
|
|
66
|
-
.options);
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=CommandHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandHandler.js","sourceRoot":"","sources":["../../../src/structures/CommandHandler.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type APIApplicationCommandInteractionDataBasicOption, type APIApplicationCommandInteraction } from "discord-api-types/v10";
|
|
2
|
-
import type { Client } from "../classes/Client.js";
|
|
3
|
-
import type { BaseCommand } from "./BaseCommand.js";
|
|
4
|
-
import { BaseInteraction } from "./BaseInteraction.js";
|
|
5
|
-
/**
|
|
6
|
-
* Represents a command interaction
|
|
7
|
-
*/
|
|
8
|
-
export declare class CommandInteraction extends BaseInteraction {
|
|
9
|
-
options: {
|
|
10
|
-
[key: string]: APIApplicationCommandInteractionDataBasicOption["value"] | undefined;
|
|
11
|
-
};
|
|
12
|
-
constructor(client: Client, data: APIApplicationCommandInteraction, command?: BaseCommand);
|
|
13
|
-
private parseOptions;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=CommandInteraction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandInteraction.d.ts","sourceRoot":"","sources":["../../../src/structures/CommandInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,+CAA+C,EAIpD,KAAK,gCAAgC,EACrC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,eAAe;IACtD,OAAO,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GACT,+CAA+C,CAAC,OAAO,CAAC,GACxD,SAAS,CAAA;KACZ,CAAK;gBAEL,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,gCAAgC,EACtC,OAAO,CAAC,EAAE,WAAW;IAsBtB,OAAO,CAAC,YAAY,CAsCnB;CACD"}
|