File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/builders/src/interactions/commands/chatInput Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 22 ApplicationIntegrationType ,
33 InteractionContextType ,
44 ApplicationCommandOptionType ,
5+ ApplicationCommandType ,
56} from 'discord-api-types/v10' ;
67import { z } from 'zod' ;
78import { localeMapPredicate , memberPermissionsPredicate } from '../../../Assertions.js' ;
@@ -163,7 +164,7 @@ export const chatInputCommandSubcommandGroupPredicate = z.object({
163164 options : z . array ( chatInputCommandSubcommandPredicate ) . min ( 1 ) . max ( 25 ) ,
164165} ) ;
165166
166- export const chatInputCommandPredicate = z . object ( {
167+ export const chatInputCommandPredicate = z . strictObject ( {
167168 ...sharedNameAndDescriptionPredicate . shape ,
168169 contexts : z . array ( z . enum ( InteractionContextType ) ) . optional ( ) ,
169170 default_member_permissions : memberPermissionsPredicate . optional ( ) ,
@@ -175,4 +176,5 @@ export const chatInputCommandPredicate = z.object({
175176 z . array ( z . union ( [ chatInputCommandSubcommandPredicate , chatInputCommandSubcommandGroupPredicate ] ) ) . max ( 25 ) ,
176177 ] )
177178 . optional ( ) ,
179+ type : z . literal ( ApplicationCommandType . ChatInput ) . optional ( ) ,
178180} ) ;
You can’t perform that action at this time.
0 commit comments