Skip to content

Commit ee04f7d

Browse files
committed
feat: add metadata to command arguments
1 parent 9309ada commit ee04f7d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/define.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,13 @@ export const defineArgument = <
151151
name: string
152152
description: string
153153
required?: boolean
154+
metadata?: Record<string, any>
154155
}) => {
155156
return {
156157
type: options.type,
157158
name: options.name,
158159
description: options.description,
159-
required: options.required ?? true
160+
required: options.required ?? true,
161+
metadata: options.metadata
160162
} as CommandArg
161163
}

src/types/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export interface CommandArg {
3333
name: string
3434
description: string
3535
required?: boolean
36+
metadata?: Record<string, any>
3637
}
3738

3839
export type MessageOrInteraction =

0 commit comments

Comments
 (0)