mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
fix: Add idPredicate (#11109)
* fix: `idPredicate` * fix: add test * test: add negative test
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { ComponentType, TextInputStyle } from 'discord-api-types/v10';
|
||||
import { z } from 'zod';
|
||||
import { customIdPredicate } from '../../Assertions.js';
|
||||
import { customIdPredicate, idPredicate } from '../../Assertions.js';
|
||||
|
||||
export const textInputPredicate = z.object({
|
||||
id: idPredicate,
|
||||
type: z.literal(ComponentType.TextInput),
|
||||
custom_id: customIdPredicate,
|
||||
style: z.enum(TextInputStyle),
|
||||
|
||||
Reference in New Issue
Block a user