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 21
21
"discord.js" : " catalog:discordjs" ,
22
22
"dotenv" : " ^16.4.7" ,
23
23
"ms" : " ^2.1.3" ,
24
- "zod" : " ^3.25.56 "
24
+ "zod" : " ^4.1.1 "
25
25
},
26
26
"devDependencies" : {
27
27
"@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' ;
2
6
3
7
export const command : CommandData = {
4
8
name : 'run-after' ,
Original file line number Diff line number Diff line change 1
1
import {
2
- after ,
2
+ unstable_after as after ,
3
3
Logger ,
4
4
type MiddlewareContext ,
5
5
stopMiddlewares ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import {
13
13
MessageCommandContext ,
14
14
stopMiddlewares ,
15
15
Logger ,
16
- after ,
16
+ unstable_after as after ,
17
17
} from 'commandkit' ;
18
18
19
19
export const command : CommandData = {
Original file line number Diff line number Diff line change 6
6
OnButtonKitClick ,
7
7
} from 'commandkit' ;
8
8
import { ButtonStyle , MessageFlags } from 'discord.js' ;
9
- import { AiConfig , AiCommand } from '@commandkit/ai' ;
9
+ import { AiConfig , AiCommand , ToolParameterType } from '@commandkit/ai' ;
10
10
import { z } from 'zod' ;
11
11
12
12
export const command : CommandData = {
@@ -15,7 +15,7 @@ export const command: CommandData = {
15
15
} ;
16
16
17
17
export const aiConfig = {
18
- parameters : z . object ( {
18
+ inputSchema : z . object ( {
19
19
message : z
20
20
. string ( )
21
21
. 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 = {
11
11
12
12
export const aiConfig = {
13
13
description : 'Get the XP of a user in a guild.' ,
14
- parameters : z . object ( {
14
+ inputSchema : z . object ( {
15
15
guildId : z . string ( ) . describe ( 'The ID of the guild.' ) ,
16
16
userId : z . string ( ) . describe ( 'The ID of the user.' ) ,
17
17
} ) ,
Original file line number Diff line number Diff line change @@ -568,28 +568,6 @@ export class Context<
568
568
export class MiddlewareContext <
569
569
T extends CommandExecutionMode = CommandExecutionMode ,
570
570
> 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
-
593
571
/**
594
572
* Sets command runner function to wrap the command execution.
595
573
* @param fn The function to set.
Original file line number Diff line number Diff line change 6
6
import { eventWorkerContext } from '../events/EventWorkerContext' ;
7
7
8
8
/**
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.
11
10
*/
12
11
export function stopMiddlewares ( ) : never {
13
12
throw createCommandKitError ( CommandKitErrorCodes . StopMiddlewares ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,13 @@ export * from './commandkit';
6
6
export * from './components' ;
7
7
export * from './config/config' ;
8
8
export * 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' ;
10
16
export * from './app/index' ;
11
17
export * from './logger/DefaultLogger' ;
12
18
export * from './logger/ILogger' ;
You can’t perform that action at this time.
0 commit comments