@minesa-org/mini-interaction 0.0.8 → 0.0.9
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/clients/MiniInteraction.d.ts +12 -4
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -37,13 +37,21 @@ export type MiniInteractionHandlerResult = {
|
|
|
37
37
|
};
|
|
38
38
|
/** Handler signature invoked for Discord message component interactions. */
|
|
39
39
|
export type MiniInteractionComponentHandler = (interaction: MessageComponentInteraction) => Promise<APIInteractionResponse | void> | APIInteractionResponse | void;
|
|
40
|
-
/**
|
|
40
|
+
/** Handler signature invoked for Discord modal submit interactions. */
|
|
41
|
+
export type MiniInteractionModalHandler = (interaction: ModalSubmitInteraction) => Promise<APIInteractionResponse | void> | APIInteractionResponse | void;
|
|
42
|
+
/** Unified handler signature that accepts both component and modal interactions. */
|
|
43
|
+
export type MiniInteractionHandler = MiniInteractionComponentHandler | MiniInteractionModalHandler;
|
|
44
|
+
/**
|
|
45
|
+
* Structure describing a component or modal handler mapped to a custom id.
|
|
46
|
+
* When auto-loading from the components directory:
|
|
47
|
+
* - Files in `components/modals/` are treated as modal handlers
|
|
48
|
+
* - Other files are treated as component handlers
|
|
49
|
+
* You can use this type for both - the system will figure out which one it is.
|
|
50
|
+
*/
|
|
41
51
|
export type MiniInteractionComponent = {
|
|
42
52
|
customId: string;
|
|
43
|
-
handler:
|
|
53
|
+
handler: MiniInteractionHandler;
|
|
44
54
|
};
|
|
45
|
-
/** Handler signature invoked for Discord modal submit interactions. */
|
|
46
|
-
export type MiniInteractionModalHandler = (interaction: ModalSubmitInteraction) => Promise<APIInteractionResponse | void> | APIInteractionResponse | void;
|
|
47
55
|
/** Structure describing a modal handler mapped to a custom id. */
|
|
48
56
|
export type MiniInteractionModal = {
|
|
49
57
|
customId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { CommandInteractionOptionResolver, createCommandInteraction, } from "./u
|
|
|
7
7
|
export type { CommandInteraction, MentionableOption, ResolvedUserOption, } from "./utils/CommandInteractionOptions.js";
|
|
8
8
|
export type { MiniInteractionFetchHandler, MiniInteractionNodeHandler, MiniInteractionHandlerResult, MiniInteractionRequest, MiniInteractionOptions, } from "./clients/MiniInteraction.js";
|
|
9
9
|
export type { MiniInteractionCommand, SlashCommandHandler, } from "./types/Commands.js";
|
|
10
|
-
export type { MiniInteractionComponent, MiniInteractionComponentHandler, MiniInteractionModal, MiniInteractionModalHandler, } from "./clients/MiniInteraction.js";
|
|
10
|
+
export type { MiniInteractionComponent, MiniInteractionComponentHandler, MiniInteractionModal, MiniInteractionModalHandler, MiniInteractionHandler, } from "./clients/MiniInteraction.js";
|
|
11
11
|
export type { MessageComponentInteraction } from "./utils/MessageComponentInteraction.js";
|
|
12
12
|
export type { ModalSubmitInteraction } from "./utils/ModalSubmitInteraction.js";
|
|
13
13
|
export { RoleConnectionMetadataTypes } from "./types/RoleConnectionMetadataTypes.js";
|
package/package.json
CHANGED