mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 08:03:30 +01:00
14 lines
391 B
TypeScript
14 lines
391 B
TypeScript
import { Locale } from 'discord-api-types/v10';
|
|
import { z } from 'zod';
|
|
|
|
export const customIdPredicate = z.string().min(1).max(100);
|
|
|
|
export const memberPermissionsPredicate = z.coerce.bigint();
|
|
|
|
export const localeMapPredicate = z.strictObject(
|
|
Object.fromEntries(Object.values(Locale).map((loc) => [loc, z.string().optional()])) as Record<
|
|
Locale,
|
|
z.ZodOptional<z.ZodString>
|
|
>,
|
|
);
|