@discordjs/builders 2.0.0-dev.1764331308-444e55a09 → 2.0.0-dev.1764547345-ec7047572
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +8 -9
- package/dist/index.d.ts +8 -9
- package/dist/index.js +33 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1854,7 +1854,7 @@ declare const buttonPredicate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1854
1854
|
name: z.ZodOptional<z.ZodString>;
|
|
1855
1855
|
animated: z.ZodOptional<z.ZodBoolean>;
|
|
1856
1856
|
}, z.core.$strict>>;
|
|
1857
|
-
label: z.ZodString
|
|
1857
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1858
1858
|
}, z.core.$strict>, z.ZodObject<{
|
|
1859
1859
|
type: z.ZodLiteral<ComponentType.Button>;
|
|
1860
1860
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1864,7 +1864,7 @@ declare const buttonPredicate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1864
1864
|
name: z.ZodOptional<z.ZodString>;
|
|
1865
1865
|
animated: z.ZodOptional<z.ZodBoolean>;
|
|
1866
1866
|
}, z.core.$strict>>;
|
|
1867
|
-
label: z.ZodString
|
|
1867
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1868
1868
|
style: z.ZodLiteral<ButtonStyle.Primary>;
|
|
1869
1869
|
}, z.core.$strict>, z.ZodObject<{
|
|
1870
1870
|
type: z.ZodLiteral<ComponentType.Button>;
|
|
@@ -1875,7 +1875,7 @@ declare const buttonPredicate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1875
1875
|
name: z.ZodOptional<z.ZodString>;
|
|
1876
1876
|
animated: z.ZodOptional<z.ZodBoolean>;
|
|
1877
1877
|
}, z.core.$strict>>;
|
|
1878
|
-
label: z.ZodString
|
|
1878
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1879
1879
|
style: z.ZodLiteral<ButtonStyle.Secondary>;
|
|
1880
1880
|
}, z.core.$strict>, z.ZodObject<{
|
|
1881
1881
|
type: z.ZodLiteral<ComponentType.Button>;
|
|
@@ -1886,7 +1886,7 @@ declare const buttonPredicate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1886
1886
|
name: z.ZodOptional<z.ZodString>;
|
|
1887
1887
|
animated: z.ZodOptional<z.ZodBoolean>;
|
|
1888
1888
|
}, z.core.$strict>>;
|
|
1889
|
-
label: z.ZodString
|
|
1889
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1890
1890
|
style: z.ZodLiteral<ButtonStyle.Success>;
|
|
1891
1891
|
}, z.core.$strict>, z.ZodObject<{
|
|
1892
1892
|
type: z.ZodLiteral<ComponentType.Button>;
|
|
@@ -1897,7 +1897,7 @@ declare const buttonPredicate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1897
1897
|
name: z.ZodOptional<z.ZodString>;
|
|
1898
1898
|
animated: z.ZodOptional<z.ZodBoolean>;
|
|
1899
1899
|
}, z.core.$strict>>;
|
|
1900
|
-
label: z.ZodString
|
|
1900
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1901
1901
|
style: z.ZodLiteral<ButtonStyle.Danger>;
|
|
1902
1902
|
}, z.core.$strict>, z.ZodObject<{
|
|
1903
1903
|
type: z.ZodLiteral<ComponentType.Button>;
|
|
@@ -2838,9 +2838,7 @@ declare const chatInputCommandPredicate: z.ZodObject<{
|
|
|
2838
2838
|
options: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
2839
2839
|
type: z.ZodLiteral<ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer | ApplicationCommandOptionType.Boolean | ApplicationCommandOptionType.User | ApplicationCommandOptionType.Channel | ApplicationCommandOptionType.Role | ApplicationCommandOptionType.Mentionable | ApplicationCommandOptionType.Number | ApplicationCommandOptionType.Attachment>;
|
|
2840
2840
|
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
2841
|
-
type: z.ZodLiteral<ApplicationCommandOptionType.Subcommand>;
|
|
2842
|
-
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
2843
|
-
type: z.ZodLiteral<ApplicationCommandOptionType.SubcommandGroup>;
|
|
2841
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<ApplicationCommandOptionType.Subcommand>, z.ZodLiteral<ApplicationCommandOptionType.SubcommandGroup>]>;
|
|
2844
2842
|
}, z.core.$strip>>]>>;
|
|
2845
2843
|
}, z.core.$strip>;
|
|
2846
2844
|
declare const chatInputCommandSubcommandGroupPredicate: z.ZodObject<{
|
|
@@ -4847,6 +4845,7 @@ declare class ValidationError extends Error {
|
|
|
4847
4845
|
|
|
4848
4846
|
declare const idPredicate: z.ZodOptional<z.ZodInt>;
|
|
4849
4847
|
declare const customIdPredicate: z.ZodString;
|
|
4848
|
+
declare const snowflakePredicate: z.ZodString;
|
|
4850
4849
|
declare const memberPermissionsPredicate: z.ZodCoercedBigInt<unknown>;
|
|
4851
4850
|
declare const localeMapPredicate: z.ZodObject<Record<Locale, z.ZodOptional<z.ZodString>>, z.core.$strict>;
|
|
4852
4851
|
|
|
@@ -4858,4 +4857,4 @@ declare const localeMapPredicate: z.ZodObject<Record<Locale, z.ZodOptional<z.Zod
|
|
|
4858
4857
|
*/
|
|
4859
4858
|
declare const version: string;
|
|
4860
4859
|
|
|
4861
|
-
export { ActionRowBuilder, type ActionRowBuilderData, AllowedMentionsBuilder, type AnyActionRowComponentBuilder, type AnyModalComponentBuilder, type ApplicationCommandNumericOptionMinMaxValueData, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelType, ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, type ApplicationCommandOptionBaseData, type ApplicationCommandOptionChannelTypesData, ApplicationCommandOptionChannelTypesMixin, type ApplicationCommandOptionWithAutocompleteData, ApplicationCommandOptionWithAutocompleteMixin, type ApplicationCommandOptionWithChoicesData, ApplicationCommandOptionWithChoicesMixin, AttachmentBuilder, type AutocompletableOptions, BaseButtonBuilder, BaseSelectMenuBuilder, type ButtonBuilder, ChannelSelectMenuBuilder, ChatInputCommandAttachmentOption, ChatInputCommandBooleanOption, ChatInputCommandBuilder, ChatInputCommandChannelOption, ChatInputCommandIntegerOption, ChatInputCommandMentionableOption, ChatInputCommandNumberOption, ChatInputCommandRoleOption, ChatInputCommandStringOption, ChatInputCommandSubcommandBuilder, ChatInputCommandSubcommandGroupBuilder, type ChatInputCommandSubcommandGroupData, ChatInputCommandUserOption, CommandBuilder, type CommandData, ComponentBuilder, type ComponentBuilderBaseData, ContainerBuilder, type ContainerBuilderData, type ContainerComponentBuilders, ContextMenuCommandBuilder, type ContextMenuCommandType, CustomIdButtonBuilder, type CustomIdButtonStyle, DangerButtonBuilder, EmbedAuthorBuilder, EmbedBuilder, type EmbedBuilderData, EmbedFieldBuilder, EmbedFooterBuilder, type EmojiOrLabelButtonData, EmojiOrLabelButtonMixin, FileBuilder, FileUploadBuilder, LabelBuilder, type LabelBuilderData, LinkButtonBuilder, type MappedComponentTypes, MediaGalleryBuilder, type MediaGalleryBuilderData, MediaGalleryItemBuilder, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, MessageBuilder, type MessageBuilderData, type MessageComponentBuilder, MessageContextCommandBuilder, MessageReferenceBuilder, type MessageTopLevelComponentBuilder, type ModalActionRowComponentBuilder, ModalBuilder, type ModalBuilderData, type ModalComponentBuilder, PollAnswerBuilder, type PollAnswerData, PollAnswerMediaBuilder, PollBuilder, type PollData, PollMediaBuilder, PollQuestionBuilder, PremiumButtonBuilder, PrimaryButtonBuilder, type RestOrArray, RoleSelectMenuBuilder, SecondaryButtonBuilder, SectionBuilder, type SectionBuilderAccessory, type SectionBuilderData, SeparatorBuilder, SharedChatInputCommandOptions, type SharedChatInputCommandOptionsData, SharedChatInputCommandSubcommands, type SharedChatInputCommandSubcommandsData, SharedName, SharedNameAndDescription, type SharedNameAndDescriptionData, type SharedNameData, StringSelectMenuBuilder, type StringSelectMenuData, StringSelectMenuOptionBuilder, SuccessButtonBuilder, TextDisplayBuilder, TextInputBuilder, ThumbnailBuilder, UserContextCommandBuilder, UserSelectMenuBuilder, ValidationError, actionRowPredicate, allowedMentionPredicate, attachmentPredicate, basicOptionPredicate, buttonPredicate, channelOptionPredicate, chatInputCommandPredicate, chatInputCommandSubcommandGroupPredicate, chatInputCommandSubcommandPredicate, containerPredicate, createComponentBuilder, customIdPredicate, disableValidators, embedAuthorPredicate, embedFieldPredicate, embedFooterPredicate, embedLength, embedPredicate, emojiPredicate, enableValidators, fileBodyMessagePredicate, filePredicate, fileUploadPredicate, idPredicate, integerOptionPredicate, isValidationEnabled, labelPredicate, localeMapPredicate, mediaGalleryItemPredicate, mediaGalleryPredicate, memberPermissionsPredicate, messageCommandPredicate, messagePredicate, messageReferencePredicate, modalPredicate, normalizeArray, numberOptionPredicate, pollAnswerMediaPredicate, pollAnswerPredicate, pollPredicate, pollQuestionPredicate, rawFilePredicate, resolveAccessoryComponent, resolveBuilder, sectionPredicate, selectMenuChannelPredicate, selectMenuMentionablePredicate, selectMenuRolePredicate, selectMenuStringOptionPredicate, selectMenuStringPredicate, selectMenuUserPredicate, separatorPredicate, stringOptionPredicate, textDisplayPredicate, textInputPredicate, thumbnailPredicate, userCommandPredicate, version };
|
|
4860
|
+
export { ActionRowBuilder, type ActionRowBuilderData, AllowedMentionsBuilder, type AnyActionRowComponentBuilder, type AnyModalComponentBuilder, type ApplicationCommandNumericOptionMinMaxValueData, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelType, ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, type ApplicationCommandOptionBaseData, type ApplicationCommandOptionChannelTypesData, ApplicationCommandOptionChannelTypesMixin, type ApplicationCommandOptionWithAutocompleteData, ApplicationCommandOptionWithAutocompleteMixin, type ApplicationCommandOptionWithChoicesData, ApplicationCommandOptionWithChoicesMixin, AttachmentBuilder, type AutocompletableOptions, BaseButtonBuilder, BaseSelectMenuBuilder, type ButtonBuilder, ChannelSelectMenuBuilder, ChatInputCommandAttachmentOption, ChatInputCommandBooleanOption, ChatInputCommandBuilder, ChatInputCommandChannelOption, ChatInputCommandIntegerOption, ChatInputCommandMentionableOption, ChatInputCommandNumberOption, ChatInputCommandRoleOption, ChatInputCommandStringOption, ChatInputCommandSubcommandBuilder, ChatInputCommandSubcommandGroupBuilder, type ChatInputCommandSubcommandGroupData, ChatInputCommandUserOption, CommandBuilder, type CommandData, ComponentBuilder, type ComponentBuilderBaseData, ContainerBuilder, type ContainerBuilderData, type ContainerComponentBuilders, ContextMenuCommandBuilder, type ContextMenuCommandType, CustomIdButtonBuilder, type CustomIdButtonStyle, DangerButtonBuilder, EmbedAuthorBuilder, EmbedBuilder, type EmbedBuilderData, EmbedFieldBuilder, EmbedFooterBuilder, type EmojiOrLabelButtonData, EmojiOrLabelButtonMixin, FileBuilder, FileUploadBuilder, LabelBuilder, type LabelBuilderData, LinkButtonBuilder, type MappedComponentTypes, MediaGalleryBuilder, type MediaGalleryBuilderData, MediaGalleryItemBuilder, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, MessageBuilder, type MessageBuilderData, type MessageComponentBuilder, MessageContextCommandBuilder, MessageReferenceBuilder, type MessageTopLevelComponentBuilder, type ModalActionRowComponentBuilder, ModalBuilder, type ModalBuilderData, type ModalComponentBuilder, PollAnswerBuilder, type PollAnswerData, PollAnswerMediaBuilder, PollBuilder, type PollData, PollMediaBuilder, PollQuestionBuilder, PremiumButtonBuilder, PrimaryButtonBuilder, type RestOrArray, RoleSelectMenuBuilder, SecondaryButtonBuilder, SectionBuilder, type SectionBuilderAccessory, type SectionBuilderData, SeparatorBuilder, SharedChatInputCommandOptions, type SharedChatInputCommandOptionsData, SharedChatInputCommandSubcommands, type SharedChatInputCommandSubcommandsData, SharedName, SharedNameAndDescription, type SharedNameAndDescriptionData, type SharedNameData, StringSelectMenuBuilder, type StringSelectMenuData, StringSelectMenuOptionBuilder, SuccessButtonBuilder, TextDisplayBuilder, TextInputBuilder, ThumbnailBuilder, UserContextCommandBuilder, UserSelectMenuBuilder, ValidationError, actionRowPredicate, allowedMentionPredicate, attachmentPredicate, basicOptionPredicate, buttonPredicate, channelOptionPredicate, chatInputCommandPredicate, chatInputCommandSubcommandGroupPredicate, chatInputCommandSubcommandPredicate, containerPredicate, createComponentBuilder, customIdPredicate, disableValidators, embedAuthorPredicate, embedFieldPredicate, embedFooterPredicate, embedLength, embedPredicate, emojiPredicate, enableValidators, fileBodyMessagePredicate, filePredicate, fileUploadPredicate, idPredicate, integerOptionPredicate, isValidationEnabled, labelPredicate, localeMapPredicate, mediaGalleryItemPredicate, mediaGalleryPredicate, memberPermissionsPredicate, messageCommandPredicate, messagePredicate, messageReferencePredicate, modalPredicate, normalizeArray, numberOptionPredicate, pollAnswerMediaPredicate, pollAnswerPredicate, pollPredicate, pollQuestionPredicate, rawFilePredicate, resolveAccessoryComponent, resolveBuilder, sectionPredicate, selectMenuChannelPredicate, selectMenuMentionablePredicate, selectMenuRolePredicate, selectMenuStringOptionPredicate, selectMenuStringPredicate, selectMenuUserPredicate, separatorPredicate, snowflakePredicate, stringOptionPredicate, textDisplayPredicate, textInputPredicate, thumbnailPredicate, userCommandPredicate, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -1854,7 +1854,7 @@ declare const buttonPredicate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1854
1854
|
name: z.ZodOptional<z.ZodString>;
|
|
1855
1855
|
animated: z.ZodOptional<z.ZodBoolean>;
|
|
1856
1856
|
}, z.core.$strict>>;
|
|
1857
|
-
label: z.ZodString
|
|
1857
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1858
1858
|
}, z.core.$strict>, z.ZodObject<{
|
|
1859
1859
|
type: z.ZodLiteral<ComponentType.Button>;
|
|
1860
1860
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1864,7 +1864,7 @@ declare const buttonPredicate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1864
1864
|
name: z.ZodOptional<z.ZodString>;
|
|
1865
1865
|
animated: z.ZodOptional<z.ZodBoolean>;
|
|
1866
1866
|
}, z.core.$strict>>;
|
|
1867
|
-
label: z.ZodString
|
|
1867
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1868
1868
|
style: z.ZodLiteral<ButtonStyle.Primary>;
|
|
1869
1869
|
}, z.core.$strict>, z.ZodObject<{
|
|
1870
1870
|
type: z.ZodLiteral<ComponentType.Button>;
|
|
@@ -1875,7 +1875,7 @@ declare const buttonPredicate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1875
1875
|
name: z.ZodOptional<z.ZodString>;
|
|
1876
1876
|
animated: z.ZodOptional<z.ZodBoolean>;
|
|
1877
1877
|
}, z.core.$strict>>;
|
|
1878
|
-
label: z.ZodString
|
|
1878
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1879
1879
|
style: z.ZodLiteral<ButtonStyle.Secondary>;
|
|
1880
1880
|
}, z.core.$strict>, z.ZodObject<{
|
|
1881
1881
|
type: z.ZodLiteral<ComponentType.Button>;
|
|
@@ -1886,7 +1886,7 @@ declare const buttonPredicate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1886
1886
|
name: z.ZodOptional<z.ZodString>;
|
|
1887
1887
|
animated: z.ZodOptional<z.ZodBoolean>;
|
|
1888
1888
|
}, z.core.$strict>>;
|
|
1889
|
-
label: z.ZodString
|
|
1889
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1890
1890
|
style: z.ZodLiteral<ButtonStyle.Success>;
|
|
1891
1891
|
}, z.core.$strict>, z.ZodObject<{
|
|
1892
1892
|
type: z.ZodLiteral<ComponentType.Button>;
|
|
@@ -1897,7 +1897,7 @@ declare const buttonPredicate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1897
1897
|
name: z.ZodOptional<z.ZodString>;
|
|
1898
1898
|
animated: z.ZodOptional<z.ZodBoolean>;
|
|
1899
1899
|
}, z.core.$strict>>;
|
|
1900
|
-
label: z.ZodString
|
|
1900
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1901
1901
|
style: z.ZodLiteral<ButtonStyle.Danger>;
|
|
1902
1902
|
}, z.core.$strict>, z.ZodObject<{
|
|
1903
1903
|
type: z.ZodLiteral<ComponentType.Button>;
|
|
@@ -2838,9 +2838,7 @@ declare const chatInputCommandPredicate: z.ZodObject<{
|
|
|
2838
2838
|
options: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
2839
2839
|
type: z.ZodLiteral<ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer | ApplicationCommandOptionType.Boolean | ApplicationCommandOptionType.User | ApplicationCommandOptionType.Channel | ApplicationCommandOptionType.Role | ApplicationCommandOptionType.Mentionable | ApplicationCommandOptionType.Number | ApplicationCommandOptionType.Attachment>;
|
|
2840
2840
|
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
2841
|
-
type: z.ZodLiteral<ApplicationCommandOptionType.Subcommand>;
|
|
2842
|
-
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
2843
|
-
type: z.ZodLiteral<ApplicationCommandOptionType.SubcommandGroup>;
|
|
2841
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<ApplicationCommandOptionType.Subcommand>, z.ZodLiteral<ApplicationCommandOptionType.SubcommandGroup>]>;
|
|
2844
2842
|
}, z.core.$strip>>]>>;
|
|
2845
2843
|
}, z.core.$strip>;
|
|
2846
2844
|
declare const chatInputCommandSubcommandGroupPredicate: z.ZodObject<{
|
|
@@ -4847,6 +4845,7 @@ declare class ValidationError extends Error {
|
|
|
4847
4845
|
|
|
4848
4846
|
declare const idPredicate: z.ZodOptional<z.ZodInt>;
|
|
4849
4847
|
declare const customIdPredicate: z.ZodString;
|
|
4848
|
+
declare const snowflakePredicate: z.ZodString;
|
|
4850
4849
|
declare const memberPermissionsPredicate: z.ZodCoercedBigInt<unknown>;
|
|
4851
4850
|
declare const localeMapPredicate: z.ZodObject<Record<Locale, z.ZodOptional<z.ZodString>>, z.core.$strict>;
|
|
4852
4851
|
|
|
@@ -4858,4 +4857,4 @@ declare const localeMapPredicate: z.ZodObject<Record<Locale, z.ZodOptional<z.Zod
|
|
|
4858
4857
|
*/
|
|
4859
4858
|
declare const version: string;
|
|
4860
4859
|
|
|
4861
|
-
export { ActionRowBuilder, type ActionRowBuilderData, AllowedMentionsBuilder, type AnyActionRowComponentBuilder, type AnyModalComponentBuilder, type ApplicationCommandNumericOptionMinMaxValueData, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelType, ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, type ApplicationCommandOptionBaseData, type ApplicationCommandOptionChannelTypesData, ApplicationCommandOptionChannelTypesMixin, type ApplicationCommandOptionWithAutocompleteData, ApplicationCommandOptionWithAutocompleteMixin, type ApplicationCommandOptionWithChoicesData, ApplicationCommandOptionWithChoicesMixin, AttachmentBuilder, type AutocompletableOptions, BaseButtonBuilder, BaseSelectMenuBuilder, type ButtonBuilder, ChannelSelectMenuBuilder, ChatInputCommandAttachmentOption, ChatInputCommandBooleanOption, ChatInputCommandBuilder, ChatInputCommandChannelOption, ChatInputCommandIntegerOption, ChatInputCommandMentionableOption, ChatInputCommandNumberOption, ChatInputCommandRoleOption, ChatInputCommandStringOption, ChatInputCommandSubcommandBuilder, ChatInputCommandSubcommandGroupBuilder, type ChatInputCommandSubcommandGroupData, ChatInputCommandUserOption, CommandBuilder, type CommandData, ComponentBuilder, type ComponentBuilderBaseData, ContainerBuilder, type ContainerBuilderData, type ContainerComponentBuilders, ContextMenuCommandBuilder, type ContextMenuCommandType, CustomIdButtonBuilder, type CustomIdButtonStyle, DangerButtonBuilder, EmbedAuthorBuilder, EmbedBuilder, type EmbedBuilderData, EmbedFieldBuilder, EmbedFooterBuilder, type EmojiOrLabelButtonData, EmojiOrLabelButtonMixin, FileBuilder, FileUploadBuilder, LabelBuilder, type LabelBuilderData, LinkButtonBuilder, type MappedComponentTypes, MediaGalleryBuilder, type MediaGalleryBuilderData, MediaGalleryItemBuilder, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, MessageBuilder, type MessageBuilderData, type MessageComponentBuilder, MessageContextCommandBuilder, MessageReferenceBuilder, type MessageTopLevelComponentBuilder, type ModalActionRowComponentBuilder, ModalBuilder, type ModalBuilderData, type ModalComponentBuilder, PollAnswerBuilder, type PollAnswerData, PollAnswerMediaBuilder, PollBuilder, type PollData, PollMediaBuilder, PollQuestionBuilder, PremiumButtonBuilder, PrimaryButtonBuilder, type RestOrArray, RoleSelectMenuBuilder, SecondaryButtonBuilder, SectionBuilder, type SectionBuilderAccessory, type SectionBuilderData, SeparatorBuilder, SharedChatInputCommandOptions, type SharedChatInputCommandOptionsData, SharedChatInputCommandSubcommands, type SharedChatInputCommandSubcommandsData, SharedName, SharedNameAndDescription, type SharedNameAndDescriptionData, type SharedNameData, StringSelectMenuBuilder, type StringSelectMenuData, StringSelectMenuOptionBuilder, SuccessButtonBuilder, TextDisplayBuilder, TextInputBuilder, ThumbnailBuilder, UserContextCommandBuilder, UserSelectMenuBuilder, ValidationError, actionRowPredicate, allowedMentionPredicate, attachmentPredicate, basicOptionPredicate, buttonPredicate, channelOptionPredicate, chatInputCommandPredicate, chatInputCommandSubcommandGroupPredicate, chatInputCommandSubcommandPredicate, containerPredicate, createComponentBuilder, customIdPredicate, disableValidators, embedAuthorPredicate, embedFieldPredicate, embedFooterPredicate, embedLength, embedPredicate, emojiPredicate, enableValidators, fileBodyMessagePredicate, filePredicate, fileUploadPredicate, idPredicate, integerOptionPredicate, isValidationEnabled, labelPredicate, localeMapPredicate, mediaGalleryItemPredicate, mediaGalleryPredicate, memberPermissionsPredicate, messageCommandPredicate, messagePredicate, messageReferencePredicate, modalPredicate, normalizeArray, numberOptionPredicate, pollAnswerMediaPredicate, pollAnswerPredicate, pollPredicate, pollQuestionPredicate, rawFilePredicate, resolveAccessoryComponent, resolveBuilder, sectionPredicate, selectMenuChannelPredicate, selectMenuMentionablePredicate, selectMenuRolePredicate, selectMenuStringOptionPredicate, selectMenuStringPredicate, selectMenuUserPredicate, separatorPredicate, stringOptionPredicate, textDisplayPredicate, textInputPredicate, thumbnailPredicate, userCommandPredicate, version };
|
|
4860
|
+
export { ActionRowBuilder, type ActionRowBuilderData, AllowedMentionsBuilder, type AnyActionRowComponentBuilder, type AnyModalComponentBuilder, type ApplicationCommandNumericOptionMinMaxValueData, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelType, ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, type ApplicationCommandOptionBaseData, type ApplicationCommandOptionChannelTypesData, ApplicationCommandOptionChannelTypesMixin, type ApplicationCommandOptionWithAutocompleteData, ApplicationCommandOptionWithAutocompleteMixin, type ApplicationCommandOptionWithChoicesData, ApplicationCommandOptionWithChoicesMixin, AttachmentBuilder, type AutocompletableOptions, BaseButtonBuilder, BaseSelectMenuBuilder, type ButtonBuilder, ChannelSelectMenuBuilder, ChatInputCommandAttachmentOption, ChatInputCommandBooleanOption, ChatInputCommandBuilder, ChatInputCommandChannelOption, ChatInputCommandIntegerOption, ChatInputCommandMentionableOption, ChatInputCommandNumberOption, ChatInputCommandRoleOption, ChatInputCommandStringOption, ChatInputCommandSubcommandBuilder, ChatInputCommandSubcommandGroupBuilder, type ChatInputCommandSubcommandGroupData, ChatInputCommandUserOption, CommandBuilder, type CommandData, ComponentBuilder, type ComponentBuilderBaseData, ContainerBuilder, type ContainerBuilderData, type ContainerComponentBuilders, ContextMenuCommandBuilder, type ContextMenuCommandType, CustomIdButtonBuilder, type CustomIdButtonStyle, DangerButtonBuilder, EmbedAuthorBuilder, EmbedBuilder, type EmbedBuilderData, EmbedFieldBuilder, EmbedFooterBuilder, type EmojiOrLabelButtonData, EmojiOrLabelButtonMixin, FileBuilder, FileUploadBuilder, LabelBuilder, type LabelBuilderData, LinkButtonBuilder, type MappedComponentTypes, MediaGalleryBuilder, type MediaGalleryBuilderData, MediaGalleryItemBuilder, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, MessageBuilder, type MessageBuilderData, type MessageComponentBuilder, MessageContextCommandBuilder, MessageReferenceBuilder, type MessageTopLevelComponentBuilder, type ModalActionRowComponentBuilder, ModalBuilder, type ModalBuilderData, type ModalComponentBuilder, PollAnswerBuilder, type PollAnswerData, PollAnswerMediaBuilder, PollBuilder, type PollData, PollMediaBuilder, PollQuestionBuilder, PremiumButtonBuilder, PrimaryButtonBuilder, type RestOrArray, RoleSelectMenuBuilder, SecondaryButtonBuilder, SectionBuilder, type SectionBuilderAccessory, type SectionBuilderData, SeparatorBuilder, SharedChatInputCommandOptions, type SharedChatInputCommandOptionsData, SharedChatInputCommandSubcommands, type SharedChatInputCommandSubcommandsData, SharedName, SharedNameAndDescription, type SharedNameAndDescriptionData, type SharedNameData, StringSelectMenuBuilder, type StringSelectMenuData, StringSelectMenuOptionBuilder, SuccessButtonBuilder, TextDisplayBuilder, TextInputBuilder, ThumbnailBuilder, UserContextCommandBuilder, UserSelectMenuBuilder, ValidationError, actionRowPredicate, allowedMentionPredicate, attachmentPredicate, basicOptionPredicate, buttonPredicate, channelOptionPredicate, chatInputCommandPredicate, chatInputCommandSubcommandGroupPredicate, chatInputCommandSubcommandPredicate, containerPredicate, createComponentBuilder, customIdPredicate, disableValidators, embedAuthorPredicate, embedFieldPredicate, embedFooterPredicate, embedLength, embedPredicate, emojiPredicate, enableValidators, fileBodyMessagePredicate, filePredicate, fileUploadPredicate, idPredicate, integerOptionPredicate, isValidationEnabled, labelPredicate, localeMapPredicate, mediaGalleryItemPredicate, mediaGalleryPredicate, memberPermissionsPredicate, messageCommandPredicate, messagePredicate, messageReferencePredicate, modalPredicate, normalizeArray, numberOptionPredicate, pollAnswerMediaPredicate, pollAnswerPredicate, pollPredicate, pollQuestionPredicate, rawFilePredicate, resolveAccessoryComponent, resolveBuilder, sectionPredicate, selectMenuChannelPredicate, selectMenuMentionablePredicate, selectMenuRolePredicate, selectMenuStringOptionPredicate, selectMenuStringPredicate, selectMenuUserPredicate, separatorPredicate, snowflakePredicate, stringOptionPredicate, textDisplayPredicate, textInputPredicate, thumbnailPredicate, userCommandPredicate, version };
|
package/dist/index.js
CHANGED
|
@@ -117,7 +117,7 @@ __export(index_exports, {
|
|
|
117
117
|
idPredicate: () => idPredicate,
|
|
118
118
|
integerOptionPredicate: () => integerOptionPredicate,
|
|
119
119
|
isValidationEnabled: () => isValidationEnabled,
|
|
120
|
-
labelPredicate: () =>
|
|
120
|
+
labelPredicate: () => labelPredicate,
|
|
121
121
|
localeMapPredicate: () => localeMapPredicate,
|
|
122
122
|
mediaGalleryItemPredicate: () => mediaGalleryItemPredicate,
|
|
123
123
|
mediaGalleryPredicate: () => mediaGalleryPredicate,
|
|
@@ -143,6 +143,7 @@ __export(index_exports, {
|
|
|
143
143
|
selectMenuStringPredicate: () => selectMenuStringPredicate,
|
|
144
144
|
selectMenuUserPredicate: () => selectMenuUserPredicate,
|
|
145
145
|
separatorPredicate: () => separatorPredicate,
|
|
146
|
+
snowflakePredicate: () => snowflakePredicate,
|
|
146
147
|
stringOptionPredicate: () => stringOptionPredicate,
|
|
147
148
|
textDisplayPredicate: () => textDisplayPredicate,
|
|
148
149
|
textInputPredicate: () => textInputPredicate,
|
|
@@ -246,15 +247,15 @@ var import_v10 = require("discord-api-types/v10");
|
|
|
246
247
|
var import_zod2 = require("zod");
|
|
247
248
|
var idPredicate = import_zod2.z.int().min(0).max(2147483647).optional();
|
|
248
249
|
var customIdPredicate = import_zod2.z.string().min(1).max(100);
|
|
250
|
+
var snowflakePredicate = import_zod2.z.string().regex(/^(?:0|[1-9]\d*)$/);
|
|
249
251
|
var memberPermissionsPredicate = import_zod2.z.coerce.bigint();
|
|
250
252
|
var localeMapPredicate = import_zod2.z.strictObject(
|
|
251
253
|
Object.fromEntries(Object.values(import_v10.Locale).map((loc) => [loc, import_zod2.z.string().optional()]))
|
|
252
254
|
);
|
|
253
255
|
|
|
254
256
|
// src/components/Assertions.ts
|
|
255
|
-
var labelPredicate = import_zod3.z.string().min(1).max(80);
|
|
256
257
|
var emojiPredicate = import_zod3.z.strictObject({
|
|
257
|
-
id:
|
|
258
|
+
id: snowflakePredicate.optional(),
|
|
258
259
|
name: import_zod3.z.string().min(2).max(32).optional(),
|
|
259
260
|
animated: import_zod3.z.boolean().optional()
|
|
260
261
|
}).refine((data) => data.id !== void 0 || data.name !== void 0, {
|
|
@@ -264,24 +265,29 @@ var buttonPredicateBase = import_zod3.z.strictObject({
|
|
|
264
265
|
type: import_zod3.z.literal(import_v102.ComponentType.Button),
|
|
265
266
|
disabled: import_zod3.z.boolean().optional()
|
|
266
267
|
});
|
|
268
|
+
var buttonLabelPredicate = import_zod3.z.string().min(1).max(80);
|
|
267
269
|
var buttonCustomIdPredicateBase = buttonPredicateBase.extend({
|
|
268
270
|
custom_id: customIdPredicate,
|
|
269
271
|
emoji: emojiPredicate.optional(),
|
|
270
|
-
label:
|
|
272
|
+
label: buttonLabelPredicate.optional()
|
|
273
|
+
}).refine((data) => data.emoji !== void 0 || data.label !== void 0, {
|
|
274
|
+
message: "Buttons with a custom id must have either an emoji or a label."
|
|
271
275
|
});
|
|
272
|
-
var buttonPrimaryPredicate = buttonCustomIdPredicateBase.
|
|
273
|
-
var buttonSecondaryPredicate = buttonCustomIdPredicateBase.
|
|
274
|
-
var buttonSuccessPredicate = buttonCustomIdPredicateBase.
|
|
275
|
-
var buttonDangerPredicate = buttonCustomIdPredicateBase.
|
|
276
|
+
var buttonPrimaryPredicate = buttonCustomIdPredicateBase.safeExtend({ style: import_zod3.z.literal(import_v102.ButtonStyle.Primary) });
|
|
277
|
+
var buttonSecondaryPredicate = buttonCustomIdPredicateBase.safeExtend({ style: import_zod3.z.literal(import_v102.ButtonStyle.Secondary) });
|
|
278
|
+
var buttonSuccessPredicate = buttonCustomIdPredicateBase.safeExtend({ style: import_zod3.z.literal(import_v102.ButtonStyle.Success) });
|
|
279
|
+
var buttonDangerPredicate = buttonCustomIdPredicateBase.safeExtend({ style: import_zod3.z.literal(import_v102.ButtonStyle.Danger) });
|
|
276
280
|
var buttonLinkPredicate = buttonPredicateBase.extend({
|
|
277
281
|
style: import_zod3.z.literal(import_v102.ButtonStyle.Link),
|
|
278
282
|
url: import_zod3.z.url({ protocol: /^(?:https?|discord)$/ }).max(512),
|
|
279
283
|
emoji: emojiPredicate.optional(),
|
|
280
|
-
label:
|
|
284
|
+
label: buttonLabelPredicate.optional()
|
|
285
|
+
}).refine((data) => data.emoji !== void 0 || data.label !== void 0, {
|
|
286
|
+
message: "Link buttons must have either an emoji or a label."
|
|
281
287
|
});
|
|
282
288
|
var buttonPremiumPredicate = buttonPredicateBase.extend({
|
|
283
289
|
style: import_zod3.z.literal(import_v102.ButtonStyle.Premium),
|
|
284
|
-
sku_id:
|
|
290
|
+
sku_id: snowflakePredicate
|
|
285
291
|
});
|
|
286
292
|
var buttonPredicate = import_zod3.z.discriminatedUnion("style", [
|
|
287
293
|
buttonLinkPredicate,
|
|
@@ -302,21 +308,21 @@ var selectMenuBasePredicate = import_zod3.z.object({
|
|
|
302
308
|
var selectMenuChannelPredicate = selectMenuBasePredicate.extend({
|
|
303
309
|
type: import_zod3.z.literal(import_v102.ComponentType.ChannelSelect),
|
|
304
310
|
channel_types: import_zod3.z.enum(import_v102.ChannelType).array().optional(),
|
|
305
|
-
default_values: import_zod3.z.object({ id:
|
|
311
|
+
default_values: import_zod3.z.object({ id: snowflakePredicate, type: import_zod3.z.literal(import_v102.SelectMenuDefaultValueType.Channel) }).array().max(25).optional()
|
|
306
312
|
});
|
|
307
313
|
var selectMenuMentionablePredicate = selectMenuBasePredicate.extend({
|
|
308
314
|
type: import_zod3.z.literal(import_v102.ComponentType.MentionableSelect),
|
|
309
315
|
default_values: import_zod3.z.object({
|
|
310
|
-
id:
|
|
316
|
+
id: snowflakePredicate,
|
|
311
317
|
type: import_zod3.z.literal([import_v102.SelectMenuDefaultValueType.Role, import_v102.SelectMenuDefaultValueType.User])
|
|
312
318
|
}).array().max(25).optional()
|
|
313
319
|
});
|
|
314
320
|
var selectMenuRolePredicate = selectMenuBasePredicate.extend({
|
|
315
321
|
type: import_zod3.z.literal(import_v102.ComponentType.RoleSelect),
|
|
316
|
-
default_values: import_zod3.z.object({ id:
|
|
322
|
+
default_values: import_zod3.z.object({ id: snowflakePredicate, type: import_zod3.z.literal(import_v102.SelectMenuDefaultValueType.Role) }).array().max(25).optional()
|
|
317
323
|
});
|
|
318
324
|
var selectMenuStringOptionPredicate = import_zod3.z.object({
|
|
319
|
-
label:
|
|
325
|
+
label: import_zod3.z.string().min(1).max(100),
|
|
320
326
|
value: import_zod3.z.string().min(1).max(100),
|
|
321
327
|
description: import_zod3.z.string().min(1).max(100).optional(),
|
|
322
328
|
emoji: emojiPredicate.optional(),
|
|
@@ -354,7 +360,7 @@ var selectMenuStringPredicate = selectMenuBasePredicate.extend({
|
|
|
354
360
|
});
|
|
355
361
|
var selectMenuUserPredicate = selectMenuBasePredicate.extend({
|
|
356
362
|
type: import_zod3.z.literal(import_v102.ComponentType.UserSelect),
|
|
357
|
-
default_values: import_zod3.z.object({ id:
|
|
363
|
+
default_values: import_zod3.z.object({ id: snowflakePredicate, type: import_zod3.z.literal(import_v102.SelectMenuDefaultValueType.User) }).array().max(25).optional()
|
|
358
364
|
});
|
|
359
365
|
var actionRowPredicate = import_zod3.z.object({
|
|
360
366
|
id: idPredicate,
|
|
@@ -2646,7 +2652,7 @@ __name(resolveAccessoryComponent, "resolveAccessoryComponent");
|
|
|
2646
2652
|
// src/components/label/Assertions.ts
|
|
2647
2653
|
var import_v1025 = require("discord-api-types/v10");
|
|
2648
2654
|
var import_zod7 = require("zod");
|
|
2649
|
-
var
|
|
2655
|
+
var labelPredicate = import_zod7.z.object({
|
|
2650
2656
|
id: idPredicate,
|
|
2651
2657
|
type: import_zod7.z.literal(import_v1025.ComponentType.Label),
|
|
2652
2658
|
label: import_zod7.z.string().min(1).max(45),
|
|
@@ -2799,7 +2805,7 @@ var LabelBuilder = class extends ComponentBuilder {
|
|
|
2799
2805
|
// The label predicate validates the component.
|
|
2800
2806
|
component: component?.toJSON(false)
|
|
2801
2807
|
};
|
|
2802
|
-
validate(
|
|
2808
|
+
validate(labelPredicate, data, validationOverride);
|
|
2803
2809
|
return data;
|
|
2804
2810
|
}
|
|
2805
2811
|
};
|
|
@@ -3136,8 +3142,12 @@ var baseChatInputCommandPredicate = sharedNameAndDescriptionPredicate.extend({
|
|
|
3136
3142
|
});
|
|
3137
3143
|
var chatInputCommandOptionsPredicate = import_zod8.z.union([
|
|
3138
3144
|
import_zod8.z.object({ type: basicOptionTypesPredicate }).array(),
|
|
3139
|
-
import_zod8.z.object({
|
|
3140
|
-
|
|
3145
|
+
import_zod8.z.object({
|
|
3146
|
+
type: import_zod8.z.union([
|
|
3147
|
+
import_zod8.z.literal(import_v1028.ApplicationCommandOptionType.Subcommand),
|
|
3148
|
+
import_zod8.z.literal(import_v1028.ApplicationCommandOptionType.SubcommandGroup)
|
|
3149
|
+
])
|
|
3150
|
+
}).array()
|
|
3141
3151
|
]);
|
|
3142
3152
|
var chatInputCommandPredicate = baseChatInputCommandPredicate.extend({
|
|
3143
3153
|
options: chatInputCommandOptionsPredicate.optional()
|
|
@@ -3788,7 +3798,7 @@ var modalPredicate = import_zod10.z.object({
|
|
|
3788
3798
|
type: import_zod10.z.literal(import_v1043.ComponentType.ActionRow),
|
|
3789
3799
|
components: import_zod10.z.object({ type: import_zod10.z.literal(import_v1043.ComponentType.TextInput) }).array().length(1)
|
|
3790
3800
|
}),
|
|
3791
|
-
|
|
3801
|
+
labelPredicate,
|
|
3792
3802
|
textDisplayPredicate
|
|
3793
3803
|
]).array().min(1).max(5)
|
|
3794
3804
|
});
|
|
@@ -4787,7 +4797,7 @@ var rawFilePredicate = import_zod13.z.object({
|
|
|
4787
4797
|
});
|
|
4788
4798
|
var attachmentPredicate = import_zod13.z.object({
|
|
4789
4799
|
// As a string it only makes sense for edits when we do have an attachment snowflake
|
|
4790
|
-
id: import_zod13.z.union([
|
|
4800
|
+
id: import_zod13.z.union([snowflakePredicate, import_zod13.z.number()]),
|
|
4791
4801
|
description: import_zod13.z.string().max(1024).optional(),
|
|
4792
4802
|
duration_secs: import_zod13.z.number().max(2 ** 31 - 1).optional(),
|
|
4793
4803
|
filename: import_zod13.z.string().max(1024).optional(),
|
|
@@ -5847,7 +5857,7 @@ var MessageBuilder = class {
|
|
|
5847
5857
|
};
|
|
5848
5858
|
|
|
5849
5859
|
// src/index.ts
|
|
5850
|
-
var version = "2.0.0-dev.
|
|
5860
|
+
var version = "2.0.0-dev.1764547345-ec7047572";
|
|
5851
5861
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5852
5862
|
0 && (module.exports = {
|
|
5853
5863
|
ActionRowBuilder,
|
|
@@ -5972,6 +5982,7 @@ var version = "2.0.0-dev.1764331308-444e55a09";
|
|
|
5972
5982
|
selectMenuStringPredicate,
|
|
5973
5983
|
selectMenuUserPredicate,
|
|
5974
5984
|
separatorPredicate,
|
|
5985
|
+
snowflakePredicate,
|
|
5975
5986
|
stringOptionPredicate,
|
|
5976
5987
|
textDisplayPredicate,
|
|
5977
5988
|
textInputPredicate,
|