File tree Expand file tree Collapse file tree 10 files changed +116
-124
lines changed Expand file tree Collapse file tree 10 files changed +116
-124
lines changed Original file line number Diff line number Diff line change 2121 "discord.js" : " catalog:discordjs" ,
2222 "dotenv" : " ^16.4.7" ,
2323 "ms" : " ^2.1.3" ,
24- "zod" : " ^3.25.56 "
24+ "zod" : " ^4.1.1 "
2525 },
2626 "devDependencies" : {
2727 "@types/ms" : " ^2.1.0" ,
Original file line number Diff line number Diff line change 1- import { CommandData , after , ChatInputCommand } from 'commandkit' ;
1+ import {
2+ CommandData ,
3+ unstable_after as after ,
4+ ChatInputCommand ,
5+ } from 'commandkit' ;
26
37export const command : CommandData = {
48 name : 'run-after' ,
Original file line number Diff line number Diff line change 11import {
2- after ,
2+ unstable_after as after ,
33 Logger ,
44 type MiddlewareContext ,
55 stopMiddlewares ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import {
1313 MessageCommandContext ,
1414 stopMiddlewares ,
1515 Logger ,
16- after ,
16+ unstable_after as after ,
1717} from 'commandkit' ;
1818
1919export const command : CommandData = {
Original file line number Diff line number Diff line change 66 OnButtonKitClick ,
77} from 'commandkit' ;
88import { ButtonStyle , MessageFlags } from 'discord.js' ;
9- import { AiConfig , AiCommand } from '@commandkit/ai' ;
9+ import { AiConfig , AiCommand , ToolParameterType } from '@commandkit/ai' ;
1010import { z } from 'zod' ;
1111
1212export const command : CommandData = {
@@ -15,7 +15,7 @@ export const command: CommandData = {
1515} ;
1616
1717export const aiConfig = {
18- parameters : z . object ( {
18+ inputSchema : z . object ( {
1919 message : z
2020 . string ( )
2121 . describe ( 'The message to be shown in the confirmation.' ) ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export const command: CommandData = {
1111
1212export const aiConfig = {
1313 description : 'Get the XP of a user in a guild.' ,
14- parameters : z . object ( {
14+ inputSchema : z . object ( {
1515 guildId : z . string ( ) . describe ( 'The ID of the guild.' ) ,
1616 userId : z . string ( ) . describe ( 'The ID of the user.' ) ,
1717 } ) ,
Original file line number Diff line number Diff line change @@ -568,28 +568,6 @@ export class Context<
568568export class MiddlewareContext <
569569 T extends CommandExecutionMode = CommandExecutionMode ,
570570> extends Context < T , MiddlewareContextArgs > {
571- // /**
572- // * @private
573- // * @internal
574- // */
575- // #cancel = false;
576-
577- // /**
578- // * Whether the command execution was cancelled.
579- // */
580- // public get cancelled(): boolean {
581- // return this.#cancel;
582- // }
583-
584- // /**
585- // * Cancels upcoming middleware and command execution.
586- // * This will **not** stop any `after()` callbacks inside the command.
587- // */
588- // public cancel(): void {
589- // this.#cancel = true;
590- // stopMiddlewares();
591- // }
592-
593571 /**
594572 * Sets command runner function to wrap the command execution.
595573 * @param fn The function to set.
Original file line number Diff line number Diff line change 66import { eventWorkerContext } from '../events/EventWorkerContext' ;
77
88/**
9- * Stop upcoming middleware and command execution.
10- * This will **not** stop any `after()` callbacks inside the command.
9+ * Stop upcoming middlewares and command execution.
1110 */
1211export function stopMiddlewares ( ) : never {
1312 throw createCommandKitError ( CommandKitErrorCodes . StopMiddlewares ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,13 @@ export * from './commandkit';
66export * from './components' ;
77export * from './config/config' ;
88export * from './context/async-context' ;
9- export * from './context/environment' ;
9+ export {
10+ type CommandKitEnvironmentInternalData ,
11+ CommandKitEnvironment ,
12+ CommandKitEnvironmentType ,
13+ cancelAfter ,
14+ after as unstable_after ,
15+ } from './context/environment' ;
1016export * from './app/index' ;
1117export * from './logger/DefaultLogger' ;
1218export * from './logger/ILogger' ;
You can’t perform that action at this time.
0 commit comments