commandkit 0.1.11-dev.20250307192025 → 0.1.11-dev.20250308122630

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as discord_js from 'discord.js';
2
- import { RESTPostAPIApplicationCommandsJSONBody, Client, Interaction, CacheType, PermissionsString, ChatInputCommandInteraction, ContextMenuCommandInteraction, UserContextMenuCommandInteraction, MessageContextMenuCommandInteraction, AutocompleteInteraction, ClientEvents, Awaitable, ButtonBuilder, ButtonInteraction, Events, ModalBuilder, ModalSubmitInteraction, ActionRowBuilder, TextInputBuilder, ButtonStyle, ComponentEmojiResolvable, TextInputStyle, Locale, Message as Message$1, ApplicationCommandOptionType, GuildMember, Attachment, User, Role, CommandInteractionOption, Collection, SlashCommandBuilder, ContextMenuCommandBuilder, PartialMessage } from 'discord.js';
2
+ import { RESTPostAPIApplicationCommandsJSONBody, Client, Interaction, CacheType, PermissionsString, ChatInputCommandInteraction, ContextMenuCommandInteraction, UserContextMenuCommandInteraction, MessageContextMenuCommandInteraction, AutocompleteInteraction, ClientEvents, Awaitable, ButtonBuilder, ButtonInteraction, Events, ModalBuilder, ModalSubmitInteraction, ActionRowBuilder, TextInputBuilder, ButtonStyle, ComponentEmojiResolvable, TextInputStyle, LocalizationMap, Locale, Message as Message$1, ApplicationCommandOptionType, GuildMember, Attachment, User, Role, CommandInteractionOption, Collection, SlashCommandBuilder, ContextMenuCommandBuilder, PartialMessage } from 'discord.js';
3
3
  import EventEmitter from 'node:events';
4
4
  import { Channel } from 'diagnostics_channel';
5
5
  import * as commander from 'commander';
@@ -576,6 +576,11 @@ interface TranslatableCommandOptions {
576
576
  ref: string;
577
577
  name?: string;
578
578
  description?: string;
579
+ options?: TranslatableCommandOptions[];
580
+ }
581
+ interface ApiTranslatableCommandOptions extends TranslatableCommandOptions {
582
+ name_localizations?: LocalizationMap;
583
+ description_localizations?: LocalizationMap;
579
584
  }
580
585
  interface Translation {
581
586
  command: TranslatableCommand;
@@ -842,7 +847,7 @@ declare const CommandExecutionMode: {
842
847
  readonly Message: "message";
843
848
  };
844
849
  type CommandExecutionMode = (typeof CommandExecutionMode)[keyof typeof CommandExecutionMode];
845
- interface ContextParameters<T extends CommandExecutionMode> {
850
+ interface ContextParameters<T extends CommandExecutionMode, Args = Record<string, any>> {
846
851
  environment?: CommandKitEnvironment;
847
852
  executionMode: T;
848
853
  interaction: T extends 'chatInput' ? ChatInputCommandInteraction : T extends 'messageContextMenu' ? MessageContextMenuCommandInteraction : T extends 'userContextMenu' ? UserContextMenuCommandInteraction : T extends 'autocomplete' ? AutocompleteInteraction : never;
@@ -850,6 +855,7 @@ interface ContextParameters<T extends CommandExecutionMode> {
850
855
  forwarded?: boolean;
851
856
  messageCommandParser?: T extends 'message' ? MessageCommandParser : never;
852
857
  store?: Map<string, any>;
858
+ customArgs?: Args;
853
859
  }
854
860
  type MessageCommandContext = Context<'message'>;
855
861
  type InteractionCommandContext = Context<'autocomplete' | 'chatInput' | 'messageContextMenu' | 'userContextMenu'>;
@@ -870,10 +876,13 @@ type AutocompleteCommand = AnyCommandExecute<AutocompleteCommandContext>;
870
876
  type MessageContextMenuCommand = AnyCommandExecute<MessageContextMenuCommandContext>;
871
877
  type UserContextMenuCommand = AnyCommandExecute<UserContextMenuCommandContext>;
872
878
  type MessageCommand = AnyCommandExecute<MessageCommandContext>;
873
- declare class Context<ExecutionMode extends CommandExecutionMode = CommandExecutionMode> {
879
+ interface MiddlewareContextArgs {
880
+ setCommandRunner?: GenericFunction<[RunCommand]>;
881
+ }
882
+ declare class Context<ExecutionMode extends CommandExecutionMode = CommandExecutionMode, Args extends Record<string, any> = Record<string, any>> {
874
883
  #private;
875
884
  readonly commandkit: CommandKit;
876
- private readonly config;
885
+ protected readonly config: ContextParameters<ExecutionMode, Args>;
877
886
  /**
878
887
  * The interaction that triggered the command.
879
888
  */
@@ -892,7 +901,7 @@ declare class Context<ExecutionMode extends CommandExecutionMode = CommandExecut
892
901
  * @param commandkit The command kit instance.
893
902
  * @param config The context parameters.
894
903
  */
895
- constructor(commandkit: CommandKit, config: ContextParameters<ExecutionMode>);
904
+ constructor(commandkit: CommandKit, config: ContextParameters<ExecutionMode, Args>);
896
905
  /**
897
906
  * The shared key-value store for this context. This can be used to store data that needs to be shared between middlewares or commands.
898
907
  * This store is shared across all contexts in the same command execution, including the cloned contexts and middleware contexts.
@@ -995,7 +1004,7 @@ declare class Context<ExecutionMode extends CommandExecutionMode = CommandExecut
995
1004
  */
996
1005
  isCached(fn: GenericFunction): boolean;
997
1006
  }
998
- declare class MiddlewareContext<T extends CommandExecutionMode = CommandExecutionMode> extends Context<T> {
1007
+ declare class MiddlewareContext<T extends CommandExecutionMode = CommandExecutionMode> extends Context<T, MiddlewareContextArgs> {
999
1008
  #private;
1000
1009
  /**
1001
1010
  * Whether the command execution was cancelled.
@@ -1005,157 +1014,69 @@ declare class MiddlewareContext<T extends CommandExecutionMode = CommandExecutio
1005
1014
  * Cancels the command execution.
1006
1015
  */
1007
1016
  cancel(): void;
1017
+ /**
1018
+ * Sets command runner function to wrap the command execution.
1019
+ * @param fn The function to set.
1020
+ * @example ctx.setCommandRunner(async (execute) => {
1021
+ * // do something before command execution
1022
+ * await execute();
1023
+ * // do something after command execution
1024
+ * })
1025
+ */
1026
+ setCommandRunner(fn: RunCommand): void;
1008
1027
  }
1009
1028
 
1010
- /**
1011
- * Represents a command file info parsed from the file system.
1012
- * It does not contain any command specific data, as that's loaded later by the command handler.
1013
- */
1014
1029
  interface ParsedCommand {
1015
- /**
1016
- * The unique identifier of the command. This is used to distinguish between commands that may have the same name.
1017
- */
1018
1030
  id: string;
1019
- /**
1020
- * The file name of the command.
1021
- */
1022
1031
  name: string;
1023
- /**
1024
- * The absolute path to the command file.
1025
- */
1026
1032
  path: string;
1027
- /**
1028
- * The relative path from the cwd to the command file.
1029
- */
1030
1033
  relativePath: string;
1031
- /**
1032
- * The category of this command. This will be the parent directory segment that matches /(category)/ in the path.
1033
- * When there are multiple segments, they are combined with a colon.
1034
- * Example: `/commands/(games)/tictactoe.js` -> category is `games`
1035
- * Example: `/commands/(games)/(fun)/tictactoe.js` -> category is `games:fun`
1036
- * Category is `null` if the parent directory segment does not match `/(\w+)/`.
1037
- */
1038
1034
  category: string | null;
1039
- /**
1040
- * Array of ids referencing the associated middleware for this command.
1041
- */
1042
- middlewares: string[];
1043
- /**
1044
- * Array of ids referencing the associated subcommands for this command.
1045
- */
1046
- subcommands: string[];
1035
+ subcommands: ParsedSubCommand[];
1036
+ middlewareIds: string[];
1047
1037
  }
1048
- /**
1049
- * Represents a middleware file info parsed from the file system.
1050
- */
1051
1038
  interface ParsedMiddleware {
1052
- /**
1053
- * The unique identifier of the middleware. This is used to distinguish between middlewares that may have the same name.
1054
- */
1055
1039
  id: string;
1056
- /**
1057
- * The file name of the middleware.
1058
- */
1059
- name: string;
1060
- /**
1061
- * The absolute path to the middleware file.
1062
- */
1063
1040
  path: string;
1064
- /**
1065
- * The relative path from the cwd to the middleware file.
1066
- */
1067
1041
  relativePath: string;
1068
- /**
1069
- * The category of this middleware. This will be the parent directory segment that matches /(category)/ in the path.
1070
- */
1071
- category: string | null;
1072
1042
  }
1073
- /**
1074
- * Represents a subcommand file info parsed from the file system.
1075
- */
1076
1043
  interface ParsedSubCommand {
1077
- /**
1078
- * The unique identifier of the subcommand. This is used to distinguish between subcommands that may have the same name.
1079
- */
1080
- id: string;
1081
- /**
1082
- * The name of the subcommand.
1083
- */
1084
1044
  name: string;
1085
- /**
1086
- * The group name of the subcommand. This is used to group subcommands together in the Discord UI.
1087
- */
1088
1045
  group: string | null;
1089
- /**
1090
- * The absolute path to the subcommand file.
1091
- */
1092
1046
  path: string;
1093
- /**
1094
- * The relative path from the cwd to the subcommand file.
1095
- */
1096
1047
  relativePath: string;
1097
- /**
1098
- * Array of ids referencing the associated middleware for this subcommand.
1099
- */
1100
- middlewares: string[];
1048
+ command: string;
1101
1049
  }
1102
- /**
1103
- * Represents a JSON compatible object that contains all the parsed commands, middlewares, and subcommands.
1104
- */
1105
- interface CommandTree {
1106
- commands: Record<string, ParsedCommand>;
1107
- middlewares: Record<string, ParsedMiddleware>;
1108
- subcommands: Record<string, ParsedSubCommand>;
1050
+ interface CommandsRouterOptions {
1051
+ entrypoint: string;
1109
1052
  }
1110
- /**
1111
- * Represents the scanned and parsed command files.
1112
- */
1113
- interface ParsedCommandData {
1053
+ interface CommandsRouterData {
1114
1054
  commands: Collection<string, ParsedCommand>;
1115
1055
  middlewares: Collection<string, ParsedMiddleware>;
1116
- subcommands: Collection<string, ParsedSubCommand>;
1117
1056
  }
1118
- interface CommandsRouterOptions {
1119
- /**
1120
- * The path to the directory containing the command files.
1121
- */
1122
- entrypoint: string;
1057
+ interface CommandsRouterRawData {
1058
+ commands: Record<string, ParsedCommand>;
1059
+ middlewares: Record<string, ParsedMiddleware>;
1123
1060
  }
1124
1061
  declare class CommandsRouter {
1125
- private options;
1062
+ private readonly options;
1126
1063
  private commands;
1127
1064
  private middlewares;
1128
- private subcommands;
1129
1065
  constructor(options: CommandsRouterOptions);
1066
+ fromData(data: CommandsRouterRawData): void;
1130
1067
  isValidPath(): boolean;
1131
- get entrypoint(): string;
1068
+ getData(): CommandsRouterData;
1069
+ toJSON(): CommandsRouterRawData;
1132
1070
  clear(): void;
1133
- reload(): Promise<CommandTree>;
1134
- visualize(): string;
1135
- getData(): ParsedCommandData;
1136
- toJSON(): CommandTree;
1137
- scan(): Promise<CommandTree>;
1138
- private scanDeep;
1139
- private processMiddleware;
1140
- private processSubcommand;
1141
- private processCommand;
1142
- /**
1143
- * Gets the appropriate file name, handling index files specially
1144
- * For index files, it returns the parent directory name (excluding category markers)
1145
- */
1146
- private getAppropriateFileName;
1147
- /**
1148
- * Extract the clean directory name, removing any category markers
1149
- */
1150
- private getDirectoryName;
1151
- private isCategoryDirectory;
1152
- private applyMiddlewareToCommands;
1153
- private applySubcommandToCommands;
1154
- private extractCategory;
1155
- private getRelativePath;
1156
- private isMiddleware;
1157
- private shouldIgnore;
1158
- private extractName;
1071
+ reload(): Promise<CommandsRouterRawData>;
1072
+ scan(): Promise<CommandsRouterRawData>;
1073
+ private traverse;
1074
+ private applyBindings;
1075
+ private distanceFromRoot;
1076
+ private parseGroup;
1077
+ private parseCategory;
1078
+ private parseFileName;
1079
+ private toRelativePath;
1159
1080
  }
1160
1081
 
1161
1082
  /**
@@ -1270,68 +1191,6 @@ declare class CommandRegistrar {
1270
1191
  updateGuildCommands(commands: CommandData[]): Promise<void>;
1271
1192
  }
1272
1193
 
1273
- interface AppCommand {
1274
- command: SlashCommandBuilder | Record<string, any>;
1275
- chatInput?: (ctx: Context) => Awaitable<unknown>;
1276
- autocomplete?: (ctx: Context) => Awaitable<unknown>;
1277
- message?: (ctx: Context) => Awaitable<unknown>;
1278
- messageContextMenu?: (ctx: Context) => Awaitable<unknown>;
1279
- userContextMenu?: (ctx: Context) => Awaitable<unknown>;
1280
- }
1281
- interface AppCommandMiddleware {
1282
- beforeExecute: (ctx: Context) => Awaitable<unknown>;
1283
- afterExecute: (ctx: Context) => Awaitable<unknown>;
1284
- }
1285
- interface LoadedCommand {
1286
- command: ParsedCommand;
1287
- data: AppCommand;
1288
- subcommands?: ParsedSubCommand[];
1289
- guilds?: string[];
1290
- }
1291
- interface LoadedMiddleware {
1292
- middleware: ParsedMiddleware;
1293
- data: AppCommandMiddleware;
1294
- }
1295
- interface PreparedAppCommandExecution {
1296
- command: LoadedCommand;
1297
- subcommand?: LoadedSubCommand | null;
1298
- middlewares: LoadedMiddleware[];
1299
- messageCommandParser?: MessageCommandParser;
1300
- }
1301
- interface LoadedSubCommand {
1302
- subcommand: ParsedSubCommand;
1303
- data: AppCommand;
1304
- }
1305
- type CommandBuilderLike = SlashCommandBuilder | ContextMenuCommandBuilder | Record<string, any>;
1306
- declare class AppCommandHandler {
1307
- readonly commandkit: CommandKit;
1308
- private loadedCommands;
1309
- private loadedSubCommands;
1310
- private loadedMiddlewares;
1311
- private commandNameToId;
1312
- private subcommandPathToId;
1313
- readonly registrar: CommandRegistrar;
1314
- private onInteraction;
1315
- private onMessageCreate;
1316
- private onMessageUpdate;
1317
- constructor(commandkit: CommandKit);
1318
- getCommandsArray(): LoadedCommand[];
1319
- /**
1320
- * Get subcommand data by ID for the command registrar
1321
- */
1322
- getSubcommandData(id: string): any;
1323
- registerCommandHandler(): void;
1324
- getExecutionMode(source: Interaction | Message$1): CommandExecutionMode;
1325
- runCommand(prepared: PreparedAppCommandExecution, source: Interaction | Message$1): Promise<void>;
1326
- prepareCommandRun(source: Interaction | Message$1): Promise<PreparedAppCommandExecution | null>;
1327
- reloadCommands(): Promise<void>;
1328
- loadCommands(): Promise<void>;
1329
- private loadMiddleware;
1330
- private loadCommand;
1331
- private loadSubcommand;
1332
- applyLocalizations(command: CommandBuilderLike): Promise<discord_js.RESTPostAPIContextMenuApplicationCommandsJSONBody | CommandBuilderLike>;
1333
- }
1334
-
1335
1194
  declare class MemoryCache extends CacheProvider {
1336
1195
  #private;
1337
1196
  get<T>(key: string): Promise<CacheEntry<T> | undefined>;
@@ -1460,6 +1319,69 @@ declare function revalidate<T = unknown>(tag: string, ...args: any[]): Promise<T
1460
1319
  */
1461
1320
  declare function isCachedFunction(fn: GenericFunction): boolean;
1462
1321
 
1322
+ type RunCommand = <T extends AsyncFunction>(fn: T) => T;
1323
+ interface AppCommand {
1324
+ command: SlashCommandBuilder | Record<string, any>;
1325
+ chatInput?: (ctx: Context) => Awaitable<unknown>;
1326
+ autocomplete?: (ctx: Context) => Awaitable<unknown>;
1327
+ message?: (ctx: Context) => Awaitable<unknown>;
1328
+ messageContextMenu?: (ctx: Context) => Awaitable<unknown>;
1329
+ userContextMenu?: (ctx: Context) => Awaitable<unknown>;
1330
+ }
1331
+ interface AppCommandMiddleware {
1332
+ beforeExecute: (ctx: Context) => Awaitable<unknown>;
1333
+ afterExecute: (ctx: Context) => Awaitable<unknown>;
1334
+ }
1335
+ interface LoadedCommand {
1336
+ command: ParsedCommand;
1337
+ data: AppCommand;
1338
+ subcommands?: ParsedSubCommand[];
1339
+ guilds?: string[];
1340
+ }
1341
+ interface LoadedMiddleware {
1342
+ middleware: ParsedMiddleware;
1343
+ data: AppCommandMiddleware;
1344
+ }
1345
+ interface PreparedAppCommandExecution {
1346
+ command: LoadedCommand;
1347
+ subcommand?: LoadedSubCommand | null;
1348
+ middlewares: LoadedMiddleware[];
1349
+ messageCommandParser?: MessageCommandParser;
1350
+ }
1351
+ interface LoadedSubCommand {
1352
+ subcommand: ParsedSubCommand;
1353
+ data: AppCommand;
1354
+ }
1355
+ type CommandBuilderLike = SlashCommandBuilder | ContextMenuCommandBuilder | Record<string, any>;
1356
+ declare class AppCommandHandler {
1357
+ readonly commandkit: CommandKit;
1358
+ private loadedCommands;
1359
+ private loadedSubCommands;
1360
+ private loadedMiddlewares;
1361
+ private commandNameToId;
1362
+ private subcommandPathToId;
1363
+ readonly registrar: CommandRegistrar;
1364
+ private onInteraction;
1365
+ private onMessageCreate;
1366
+ private onMessageUpdate;
1367
+ constructor(commandkit: CommandKit);
1368
+ getCommandsArray(): LoadedCommand[];
1369
+ /**
1370
+ * Get subcommand data by command ID and subcommand name
1371
+ */
1372
+ getSubcommandData(commandId: string, subcommandName: string): any;
1373
+ registerCommandHandler(): void;
1374
+ getExecutionMode(source: Interaction | Message$1): CommandExecutionMode;
1375
+ runCommand(prepared: PreparedAppCommandExecution, source: Interaction | Message$1): Promise<void>;
1376
+ prepareCommandRun(source: Interaction | Message$1): Promise<PreparedAppCommandExecution | null>;
1377
+ reloadCommands(): Promise<void>;
1378
+ loadCommands(): Promise<void>;
1379
+ private loadMiddleware;
1380
+ private loadCommand;
1381
+ private loadSubcommand;
1382
+ applyLocalizations(command: CommandBuilderLike, subcommand?: ParsedSubCommand): Promise<CommandBuilderLike>;
1383
+ }
1384
+
1463
1385
  type ListenerFunction = GenericFunction | AsyncFunction;
1464
1386
  declare class CommandKitEventsChannel {
1465
1387
  readonly commandkit: CommandKit;
@@ -2003,4 +1925,4 @@ declare const version: string;
2003
1925
  */
2004
1926
  declare function bootstrapCommandkitCLI(argv: string[], options?: commander.ParseOptions | undefined): Promise<void>;
2005
1927
 
2006
- export { ActionRow, type ActionRowProps, type AnyCommandExecute, type AnyCommandKitElement, AppCommandHandler, type AsyncFunction, type AutocompleteCommand, type AutocompleteCommandContext, type AutocompleteCommandMiddlewareContext, type AutocompleteProps, Button, type ButtonChildrenLike, ButtonKit, type ButtonKitPredicate, type ButtonProps, type CacheContext, type CacheEntry, type CacheMetadata, CacheProvider, type CommandContext, type CommandContextOptions, type CommandData, CommandExecutionMode, type CommandFileObject, CommandKit, type CommandKitButtonBuilderInteractionCollectorDispatch, type CommandKitButtonBuilderInteractionCollectorDispatchContextData, type CommandKitButtonBuilderOnEnd, type CommandKitConfiguration, type CommandKitElement, type CommandKitElementData, CommandKitEnvironment, type CommandKitEnvironmentInternalData, CommandKitEnvironmentType, type CommandKitLoggerOptions, type CommandKitModalBuilderInteractionCollectorDispatch, type CommandKitModalBuilderInteractionCollectorDispatchContextData, type CommandKitModalBuilderOnEnd, type CommandKitOptions, type CommandObject, type CommandOptions, type CommandProps, type CommandTree, CommandsRouter, type CommandsRouterOptions, Context, type ContextMenuCommandProps, type ContextParameters, DefaultLocalizationStrategy, DefaultLogger, ElementType, EventInterceptor, type EventInterceptorContextData, type EventInterceptorErrorHandler, EventsRouter, type EventsRouterOptions, type EventsTree, Fragment, type FragmentElementProps, type GenericFunction, type ILogger, type InteractionCommandContext, type InteractionCommandMiddlewareContext, type LoadedCommand, Localization, type LocalizationConfig, type LocalizationStrategy, type LocalizationTranslationRequest, Logger, type LoggerImpl, type MaybeArray, MemoryCache, type MessageCommand, type MessageCommandContext, type MessageCommandMiddlewareContext, MessageCommandOptions, type MessageCommandOptionsSchema, MessageCommandParser, type MessageContextMenuCommand, type MessageContextMenuCommandContext, type MessageContextMenuCommandMiddlewareContext, type MessageContextMenuCommandProps, MiddlewareContext, Modal, ModalKit, type ModalKitPredicate, type ModalProps, type OnButtonKitClick, type OnButtonKitEnd, type OnModalKitEnd, type OnModalKitSubmit, ParagraphInput, type ParsedCommand, type ParsedCommandData, type ParsedEvent, type ParsedMessageCommand, type ParsedMiddleware, type ParsedSubCommand, type PreparedAppCommandExecution, type ReloadOptions, ReloadType, ShortInput, type SlashCommand, type SlashCommandContext, type SlashCommandMiddlewareContext, type SlashCommandProps, TextInput, type TextInputProps, type TranslatableArguments, type TranslatableCommand, type TranslatableCommandOptions, type Translation, type TranslationResult, type Translator, type UserContextMenuCommand, type UserContextMenuCommandContext, type UserContextMenuCommandMiddlewareContext, type UserContextMenuCommandProps, type ValidationProps, afterCommand, bootstrapCommandkitCLI, cache, cacheLife, cacheTag, cancelAfterCommand, createElement, createLogger, CommandKit as default, defineConfig, dmOnly, exitContext, exitMiddleware, getCommandKit, getConfig, getContext, getElement, guildOnly, invalidate, isCachedFunction, isCommandKitElement, makeContextAwareFunction, redirect, rethrow, revalidate, useCache as super_duper_secret_internal_for_use_cache_directive_of_commandkit_cli_do_not_use_it_directly_or_you_will_be_fired_from_your_job_kthxbai, useEnvironment, version };
1928
+ export { ActionRow, type ActionRowProps, type AnyCommandExecute, type AnyCommandKitElement, type ApiTranslatableCommandOptions, AppCommandHandler, type AsyncFunction, type AutocompleteCommand, type AutocompleteCommandContext, type AutocompleteCommandMiddlewareContext, type AutocompleteProps, Button, type ButtonChildrenLike, ButtonKit, type ButtonKitPredicate, type ButtonProps, type CacheContext, type CacheEntry, type CacheMetadata, CacheProvider, type CommandContext, type CommandContextOptions, type CommandData, CommandExecutionMode, type CommandFileObject, CommandKit, type CommandKitButtonBuilderInteractionCollectorDispatch, type CommandKitButtonBuilderInteractionCollectorDispatchContextData, type CommandKitButtonBuilderOnEnd, type CommandKitConfiguration, type CommandKitElement, type CommandKitElementData, CommandKitEnvironment, type CommandKitEnvironmentInternalData, CommandKitEnvironmentType, type CommandKitLoggerOptions, type CommandKitModalBuilderInteractionCollectorDispatch, type CommandKitModalBuilderInteractionCollectorDispatchContextData, type CommandKitModalBuilderOnEnd, type CommandKitOptions, type CommandObject, type CommandOptions, type CommandProps, CommandsRouter, type CommandsRouterData, type CommandsRouterOptions, type CommandsRouterRawData, Context, type ContextMenuCommandProps, type ContextParameters, DefaultLocalizationStrategy, DefaultLogger, ElementType, EventInterceptor, type EventInterceptorContextData, type EventInterceptorErrorHandler, EventsRouter, type EventsRouterOptions, type EventsTree, Fragment, type FragmentElementProps, type GenericFunction, type ILogger, type InteractionCommandContext, type InteractionCommandMiddlewareContext, type LoadedCommand, Localization, type LocalizationConfig, type LocalizationStrategy, type LocalizationTranslationRequest, Logger, type LoggerImpl, type MaybeArray, MemoryCache, type MessageCommand, type MessageCommandContext, type MessageCommandMiddlewareContext, MessageCommandOptions, type MessageCommandOptionsSchema, MessageCommandParser, type MessageContextMenuCommand, type MessageContextMenuCommandContext, type MessageContextMenuCommandMiddlewareContext, type MessageContextMenuCommandProps, MiddlewareContext, type MiddlewareContextArgs, Modal, ModalKit, type ModalKitPredicate, type ModalProps, type OnButtonKitClick, type OnButtonKitEnd, type OnModalKitEnd, type OnModalKitSubmit, ParagraphInput, type ParsedCommand, type ParsedEvent, type ParsedMessageCommand, type ParsedMiddleware, type ParsedSubCommand, type PreparedAppCommandExecution, type ReloadOptions, ReloadType, type RunCommand, ShortInput, type SlashCommand, type SlashCommandContext, type SlashCommandMiddlewareContext, type SlashCommandProps, TextInput, type TextInputProps, type TranslatableArguments, type TranslatableCommand, type TranslatableCommandOptions, type Translation, type TranslationResult, type Translator, type UserContextMenuCommand, type UserContextMenuCommandContext, type UserContextMenuCommandMiddlewareContext, type UserContextMenuCommandProps, type ValidationProps, afterCommand, bootstrapCommandkitCLI, cache, cacheLife, cacheTag, cancelAfterCommand, createElement, createLogger, CommandKit as default, defineConfig, dmOnly, exitContext, exitMiddleware, getCommandKit, getConfig, getContext, getElement, guildOnly, invalidate, isCachedFunction, isCommandKitElement, makeContextAwareFunction, redirect, rethrow, revalidate, useCache as super_duper_secret_internal_for_use_cache_directive_of_commandkit_cli_do_not_use_it_directly_or_you_will_be_fired_from_your_job_kthxbai, useEnvironment, version };