1 line
63 KiB
Plaintext
1 line
63 KiB
Plaintext
|
{"version":3,"sources":["../src/index.ts","../src/messages/embed/Assertions.ts","../src/messages/embed/Embed.ts","../src/messages/formatters.ts","../src/interactions/slashCommands/Assertions.ts","../src/interactions/slashCommands/SlashCommandBuilder.ts","../src/interactions/slashCommands/options/boolean.ts","../src/interactions/slashCommands/mixins/NameAndDescription.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts","../src/interactions/slashCommands/options/channel.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts","../src/interactions/slashCommands/options/integer.ts","../src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts","../src/interactions/slashCommands/options/mentionable.ts","../src/interactions/slashCommands/options/number.ts","../src/interactions/slashCommands/options/role.ts","../src/interactions/slashCommands/options/string.ts","../src/interactions/slashCommands/options/user.ts","../src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts","../src/interactions/slashCommands/SlashCommandSubcommands.ts","../src/interactions/contextMenuCommands/Assertions.ts","../src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts"],"sourcesContent":["export * as EmbedAssertions from './messages/embed/Assertions';\nexport * from './messages/embed/Embed';\nexport * from './messages/formatters';\n\nexport * as SlashCommandAssertions from './interactions/slashCommands/Assertions';\nexport * from './interactions/slashCommands/SlashCommandBuilder';\nexport * from './interactions/slashCommands/SlashCommandSubcommands';\nexport * from './interactions/slashCommands/options/boolean';\nexport * from './interactions/slashCommands/options/channel';\nexport * from './interactions/slashCommands/options/integer';\nexport * from './interactions/slashCommands/options/mentionable';\nexport * from './interactions/slashCommands/options/number';\nexport * from './interactions/slashCommands/options/role';\nexport * from './interactions/slashCommands/options/string';\nexport * from './interactions/slashCommands/options/user';\n\nexport * as ContextMenuCommandAssertions from './interactions/contextMenuCommands/Assertions';\nexport * from './interactions/contextMenuCommands/ContextMenuCommandBuilder';\n","import type { APIEmbedField } from 'discord-api-types/v9';\nimport { z } from 'zod';\n\nexport const fieldNamePredicate = z.string().min(1).max(256);\n\nexport const fieldValuePredicate = z.string().min(1).max(1024);\n\nexport const fieldInlinePredicate = z.boolean().optional();\n\nexport const embedFieldPredicate = z.object({\n\tname: fieldNamePredicate,\n\tvalue: fieldValuePredicate,\n\tinline: fieldInlinePredicate,\n});\n\nexport const embedFieldsArrayPredicate = embedFieldPredicate.array();\n\nexport const fieldLengthPredicate = z.number().lte(25);\n\nexport function validateFieldLength(fields: APIEmbedField[], amountAdding: number): void {\n\tfieldLengthPredicate.parse(fields.length + amountAdding);\n}\n\nexport const authorNamePredicate = fieldNamePredicate.nullable();\n\nexport const urlPredicate = z.string().url().nullish();\n\nexport const colorPredicate = z.number().gte(0).lte(0xffffff).nullable();\n\nexport const descriptionPredicate = z.string().min(1).max(4096).nullable();\n\nexport const footerTextPredicate = z.string().min(1).max(2048).nullable();\n\nexport const timestampPredicate = z.union([z.number(), z.date()]).nullable();\n\nexport const titlePredicate = fieldNamePredicate.nullable();\n","import type {\n\tAPIEmbed,\n\tAPIEmbedAuthor,\n\tAPIEmbedField,\n\tAPIEmbedFooter,\n\tAPIEmbedImage,\n\tAPIEmbedProvider,\n\tAPIEmbedThumbnail,\n\tAPIEmbedVideo,\n} from 'discord-api-types/v9';\nimport {\n\tauthorNamePredicate,\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedFieldsArrayPredicate,\n\tfieldInlinePredicate,\n\tfieldNamePredicate,\n\tfieldValuePredicate,\n\tfooterTextPredicate,\n\ttimestampPredicate,\
|