@@ -124,9 +124,12 @@ export const command: CommandData = {
124
124
};
125
125
126
126
export const aiConfig: AiConfig = {
127
- parameters : z .object ({
127
+ inputSchema : z .object ({
128
128
username: z .string ().describe (' The username to greet' ),
129
- message: z .string ().optional ().describe (' Optional custom greeting message' ),
129
+ message: z
130
+ .string ()
131
+ .optional ()
132
+ .describe (' Optional custom greeting message' ),
130
133
}),
131
134
};
132
135
@@ -282,8 +285,10 @@ import { z } from 'zod';
282
285
export const getWeather = createTool ({
283
286
name: ' getWeather' ,
284
287
description: ' Get current weather information for a location' ,
285
- parameters: z .object ({
286
- location: z .string ().describe (' The city or location to get weather for' ),
288
+ inputSchema: z .object ({
289
+ location: z
290
+ .string ()
291
+ .describe (' The city or location to get weather for' ),
287
292
units: z .enum ([' celsius' , ' fahrenheit' ]).default (' celsius' ),
288
293
}),
289
294
async execute(ctx , params ) {
@@ -422,7 +427,9 @@ export const ai: AiCommand<typeof aiConfig> = async (ctx) => {
422
427
423
428
// Validate AI-generated parameters
424
429
if (action === ' ban' && ! isModeratorRole (ctx .message .member )) {
425
- await ctx .message .reply (' ❌ Only moderators can perform ban actions.' );
430
+ await ctx .message .reply (
431
+ ' ❌ Only moderators can perform ban actions.' ,
432
+ );
426
433
return ;
427
434
}
428
435
@@ -528,7 +535,9 @@ configureAI({
528
535
await message .reply (` Debug Error: ${error .message } ` );
529
536
} else {
530
537
// Generic error in production
531
- await message .reply (' An error occurred while processing your request.' );
538
+ await message .reply (
539
+ ' An error occurred while processing your request.' ,
540
+ );
532
541
}
533
542
},
534
543
});
0 commit comments