@@ -124,9 +124,12 @@ export const command: CommandData = {
124124};
125125
126126export const aiConfig: AiConfig = {
127- parameters : z .object ({
127+ inputSchema : z .object ({
128128 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' ),
130133 }),
131134};
132135
@@ -282,8 +285,10 @@ import { z } from 'zod';
282285export const getWeather = createTool ({
283286 name: ' getWeather' ,
284287 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' ),
287292 units: z .enum ([' celsius' , ' fahrenheit' ]).default (' celsius' ),
288293 }),
289294 async execute(ctx , params ) {
@@ -422,7 +427,9 @@ export const ai: AiCommand<typeof aiConfig> = async (ctx) => {
422427
423428 // Validate AI-generated parameters
424429 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+ );
426433 return ;
427434 }
428435
@@ -528,7 +535,9 @@ configureAI({
528535 await message .reply (` Debug Error: ${error .message } ` );
529536 } else {
530537 // 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+ );
532541 }
533542 },
534543});
0 commit comments