@discordjs/builders 2.0.0-dev.1745194448-8f35dfd03 → 2.0.0-dev.1745453588-abc5d99ce

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 CHANGED
@@ -1,9 +1,10 @@
1
1
  import * as discord_api_types_v10 from 'discord-api-types/v10';
2
- import { APIButtonComponent, APIButtonComponentWithSKUId, APIMessageComponentEmoji, APIActionRowComponent, APIActionRowComponentTypes, APIButtonComponentWithCustomId, APIButtonComponentWithURL, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, ChannelType, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APISelectMenuOption, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, ComponentType, APIModalComponent, APIMessageComponent, ButtonStyle, APIApplicationCommandIntegerOption, APIApplicationCommandChannelOption, APIApplicationCommandNumberOption, APIApplicationCommandStringOption, APIApplicationCommandOptionChoice, RESTPostAPIApplicationCommandsJSONBody, Locale, APIApplicationCommand, APIApplicationCommandBasicOption, APIApplicationCommandOption, ApplicationCommandOptionType, APIApplicationCommandSubcommandOption, APIApplicationCommandSubcommandGroupOption, InteractionContextType, ApplicationIntegrationType, Permissions, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody, APIModalInteractionResponseCallbackData, APIModalActionRowComponent, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbed, PollLayoutType, APIPollMedia, APIPartialEmoji, APIPollAnswer, RESTAPIPoll, APIAllowedMentions, AllowedMentionsTypes, MessageReferenceType, RESTAPIAttachment, APIMessageReference, RESTPostAPIChannelMessageJSONBody, APIMessageActionRowComponent, APIAttachment, MessageFlags, APIPoll } from 'discord-api-types/v10';
2
+ import { APIButtonComponent, APIButtonComponentWithSKUId, APIMessageComponentEmoji, APIBaseComponent, ComponentType, APIButtonComponentWithCustomId, APIButtonComponentWithURL, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, ChannelType, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APISelectMenuOption, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIFileComponent, APIMediaGalleryItem, APIMediaGalleryComponent, APITextDisplayComponent, APIThumbnailComponent, APISectionComponent, ButtonStyle, APISeparatorComponent, SeparatorSpacingSize, APIContainerComponent, APIActionRowComponent, APIComponentInContainer, APIModalComponent, APIMessageComponent, APISectionAccessoryComponent, APIComponentInActionRow, APIApplicationCommandIntegerOption, APIApplicationCommandChannelOption, APIApplicationCommandNumberOption, APIApplicationCommandStringOption, APIApplicationCommandOptionChoice, RESTPostAPIApplicationCommandsJSONBody, Locale, APIApplicationCommand, APIApplicationCommandBasicOption, APIApplicationCommandOption, ApplicationCommandOptionType, APIApplicationCommandSubcommandOption, APIApplicationCommandSubcommandGroupOption, InteractionContextType, ApplicationIntegrationType, Permissions, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody, APIModalInteractionResponseCallbackData, APIComponentInModalActionRow, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbed, PollLayoutType, APIPollMedia, APIPartialEmoji, APIPollAnswer, RESTAPIPoll, APIAllowedMentions, AllowedMentionsTypes, MessageReferenceType, RESTAPIAttachment, APIMessageReference, RESTPostAPIChannelMessageJSONBody, APIComponentInMessageActionRow as APIComponentInMessageActionRow$1, APIMessageTopLevelComponent, APIAttachment, MessageFlags, APIPoll } from 'discord-api-types/v10';
3
3
  import { JSONEncodable } from '@discordjs/util';
4
4
  import * as ts_mixer_dist_types_types_js from 'ts-mixer/dist/types/types.js';
5
5
  import * as zod from 'zod';
6
6
  import { z, ZodTypeAny } from 'zod';
7
+ import { APIComponentInMessageActionRow, APISeparatorComponent as APISeparatorComponent$1 } from 'discord-api-types/v9';
7
8
 
8
9
  interface EmojiOrLabelButtonData extends Pick<Exclude<APIButtonComponent, APIButtonComponentWithSKUId>, 'emoji' | 'label'> {
9
10
  }
@@ -31,16 +32,26 @@ declare class EmojiOrLabelButtonMixin {
31
32
  clearLabel(): this;
32
33
  }
33
34
 
34
- /**
35
- * Any action row component data represented as an object.
36
- */
37
- type AnyAPIActionRowComponent = APIActionRowComponent<APIActionRowComponentTypes> | APIActionRowComponentTypes;
35
+ interface ComponentBuilderBaseData {
36
+ id?: number | undefined;
37
+ }
38
38
  /**
39
39
  * The base component builder that contains common symbols for all sorts of components.
40
40
  *
41
41
  * @typeParam Component - The type of API data that is stored within the builder
42
42
  */
43
- declare abstract class ComponentBuilder<Component extends AnyAPIActionRowComponent> implements JSONEncodable<Component> {
43
+ declare abstract class ComponentBuilder<Component extends APIBaseComponent<ComponentType>> implements JSONEncodable<Component> {
44
+ protected abstract readonly data: ComponentBuilderBaseData;
45
+ /**
46
+ * Sets the id of this component.
47
+ *
48
+ * @param id - The id to use
49
+ */
50
+ setId(id: number): this;
51
+ /**
52
+ * Clears the id of this component, defaulting to a default incremented id.
53
+ */
54
+ clearId(): this;
44
55
  /**
45
56
  * Serializes this builder to API-compatible JSON data.
46
57
  *
@@ -149,7 +160,7 @@ declare class PremiumButtonBuilder extends BaseButtonBuilder<APIButtonComponentW
149
160
  * @typeParam SelectMenuType - The type of select menu this would be instantiated for.
150
161
  */
151
162
  declare abstract class BaseSelectMenuBuilder<Data extends APISelectMenuComponent> extends ComponentBuilder<Data> implements JSONEncodable<APISelectMenuComponent> {
152
- protected abstract readonly data: Partial<Pick<Data, 'custom_id' | 'disabled' | 'max_values' | 'min_values' | 'placeholder'>>;
163
+ protected abstract readonly data: Partial<Pick<Data, 'custom_id' | 'disabled' | 'id' | 'max_values' | 'min_values' | 'placeholder'>>;
153
164
  /**
154
165
  * Sets the placeholder for this select menu.
155
166
  *
@@ -577,7 +588,7 @@ declare class UserSelectMenuBuilder extends BaseSelectMenuBuilder<APIUserSelectC
577
588
  * A builder that creates API-compatible JSON data for text inputs.
578
589
  */
579
590
  declare class TextInputBuilder extends ComponentBuilder<APITextInputComponent> {
580
- private readonly data;
591
+ protected readonly data: Partial<APITextInputComponent>;
581
592
  /**
582
593
  * Creates a new text input from API data.
583
594
  *
@@ -704,256 +715,800 @@ declare const textInputPredicate: z.ZodObject<{
704
715
  required?: boolean | undefined;
705
716
  }>;
706
717
 
707
- /**
708
- * The builders that may be used for messages.
709
- */
710
- type MessageComponentBuilder = ActionRowBuilder | MessageActionRowComponentBuilder;
711
- /**
712
- * The builders that may be used for modals.
713
- */
714
- type ModalComponentBuilder = ActionRowBuilder | ModalActionRowComponentBuilder;
715
- /**
716
- * Any button builder
717
- */
718
- type ButtonBuilder = DangerButtonBuilder | LinkButtonBuilder | PremiumButtonBuilder | PrimaryButtonBuilder | SecondaryButtonBuilder | SuccessButtonBuilder;
719
- /**
720
- * The builders that may be used within an action row for messages.
721
- */
722
- type MessageActionRowComponentBuilder = ButtonBuilder | ChannelSelectMenuBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | UserSelectMenuBuilder;
723
- /**
724
- * The builders that may be used within an action row for modals.
725
- */
726
- type ModalActionRowComponentBuilder = TextInputBuilder;
727
- /**
728
- * Any action row component builder.
729
- */
730
- type AnyActionRowComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder;
731
- /**
732
- * Components here are mapped to their respective builder.
733
- */
734
- interface MappedComponentTypes {
718
+ declare class FileBuilder extends ComponentBuilder<APIFileComponent> {
719
+ protected readonly data: Partial<APIFileComponent>;
735
720
  /**
736
- * The action row component type is associated with an {@link ActionRowBuilder}.
721
+ * Creates a new file from API data.
722
+ *
723
+ * @param data - The API data to create this file with
724
+ * @example
725
+ * Creating a file from an API data object:
726
+ * ```ts
727
+ * const file = new FileBuilder({
728
+ * spoiler: true,
729
+ * file: {
730
+ * url: 'attachment://file.png',
731
+ * },
732
+ * });
733
+ * ```
734
+ * @example
735
+ * Creating a file using setters and API data:
736
+ * ```ts
737
+ * const file = new FileBuilder({
738
+ * file: {
739
+ * url: 'attachment://image.jpg',
740
+ * },
741
+ * })
742
+ * .setSpoiler(false);
743
+ * ```
737
744
  */
738
- [ComponentType.ActionRow]: ActionRowBuilder;
745
+ constructor(data?: Partial<APIFileComponent>);
739
746
  /**
740
- * The button component type is associated with a {@link BaseButtonBuilder}.
747
+ * Sets the spoiler status of this file.
748
+ *
749
+ * @param spoiler - The spoiler status to use
741
750
  */
742
- [ComponentType.Button]: ButtonBuilder;
751
+ setSpoiler(spoiler?: boolean): this;
743
752
  /**
744
- * The string select component type is associated with a {@link StringSelectMenuBuilder}.
753
+ * Sets the media URL of this file.
754
+ *
755
+ * @param url - The URL to use
745
756
  */
746
- [ComponentType.StringSelect]: StringSelectMenuBuilder;
757
+ setURL(url: string): this;
747
758
  /**
748
- * The text input component type is associated with a {@link TextInputBuilder}.
759
+ * {@inheritDoc ComponentBuilder.toJSON}
749
760
  */
750
- [ComponentType.TextInput]: TextInputBuilder;
761
+ toJSON(validationOverride?: boolean): APIFileComponent;
762
+ }
763
+
764
+ declare class MediaGalleryItemBuilder implements JSONEncodable<APIMediaGalleryItem> {
765
+ private readonly data;
751
766
  /**
752
- * The user select component type is associated with a {@link UserSelectMenuBuilder}.
767
+ * Creates a new media gallery item from API data.
768
+ *
769
+ * @param data - The API data to create this media gallery item with
770
+ * @example
771
+ * Creating a media gallery item from an API data object:
772
+ * ```ts
773
+ * const item = new MediaGalleryItemBuilder({
774
+ * description: "Some text here",
775
+ * media: {
776
+ * url: 'https://cdn.discordapp.com/embed/avatars/2.png',
777
+ * },
778
+ * });
779
+ * ```
780
+ * @example
781
+ * Creating a media gallery item using setters and API data:
782
+ * ```ts
783
+ * const item = new MediaGalleryItemBuilder({
784
+ * media: {
785
+ * url: 'https://cdn.discordapp.com/embed/avatars/5.png',
786
+ * },
787
+ * })
788
+ * .setDescription("alt text");
789
+ * ```
753
790
  */
754
- [ComponentType.UserSelect]: UserSelectMenuBuilder;
791
+ constructor(data?: Partial<APIMediaGalleryItem>);
755
792
  /**
756
- * The role select component type is associated with a {@link RoleSelectMenuBuilder}.
793
+ * Sets the source URL of this media gallery item.
794
+ *
795
+ * @param url - The URL to use
757
796
  */
758
- [ComponentType.RoleSelect]: RoleSelectMenuBuilder;
797
+ setURL(url: string): this;
759
798
  /**
760
- * The mentionable select component type is associated with a {@link MentionableSelectMenuBuilder}.
799
+ * Sets the description of this thumbnail.
800
+ *
801
+ * @param description - The description to use
761
802
  */
762
- [ComponentType.MentionableSelect]: MentionableSelectMenuBuilder;
803
+ setDescription(description: string): this;
763
804
  /**
764
- * The channel select component type is associated with a {@link ChannelSelectMenuBuilder}.
805
+ * Clears the description of this thumbnail.
765
806
  */
766
- [ComponentType.ChannelSelect]: ChannelSelectMenuBuilder;
807
+ clearDescription(): this;
808
+ /**
809
+ * Sets the spoiler status of this thumbnail.
810
+ *
811
+ * @param spoiler - The spoiler status to use
812
+ */
813
+ setSpoiler(spoiler?: boolean): this;
814
+ /**
815
+ * Transforms this object to its JSON format
816
+ */
817
+ toJSON(validationOverride?: boolean): APIMediaGalleryItem;
767
818
  }
768
- /**
769
- * Factory for creating components from API data.
770
- *
771
- * @typeParam ComponentType - The type of component to use
772
- * @param data - The API data to transform to a component class
773
- */
774
- declare function createComponentBuilder<ComponentType extends keyof MappedComponentTypes>(data: (APIModalComponent | APIMessageComponent) & {
775
- type: ComponentType;
776
- }): MappedComponentTypes[ComponentType];
777
- /**
778
- * Factory for creating components from API data.
779
- *
780
- * @typeParam ComponentBuilder - The type of component to use
781
- * @param data - The API data to transform to a component class
782
- */
783
- declare function createComponentBuilder<ComponentBuilder extends MessageComponentBuilder | ModalComponentBuilder>(data: ComponentBuilder): ComponentBuilder;
784
819
 
785
- interface ActionRowBuilderData extends Partial<Omit<APIActionRowComponent<APIActionRowComponentTypes>, 'components'>> {
786
- components: AnyActionRowComponentBuilder[];
820
+ interface MediaGalleryBuilderData extends Partial<Omit<APIMediaGalleryComponent, 'items'>> {
821
+ items: MediaGalleryItemBuilder[];
787
822
  }
788
- /**
789
- * A builder that creates API-compatible JSON data for action rows.
790
- *
791
- * @typeParam ComponentType - The types of components this action row holds
792
- */
793
- declare class ActionRowBuilder extends ComponentBuilder<APIActionRowComponent<APIActionRowComponentTypes>> {
794
- private readonly data;
795
- /**
796
- * The components within this action row.
797
- */
798
- get components(): readonly AnyActionRowComponentBuilder[];
823
+ declare class MediaGalleryBuilder extends ComponentBuilder<APIMediaGalleryComponent> {
824
+ protected readonly data: MediaGalleryBuilderData;
799
825
  /**
800
- * Creates a new action row from API data.
826
+ * Creates a new media gallery from API data.
801
827
  *
802
- * @param data - The API data to create this action row with
828
+ * @param data - The API data to create this container with
803
829
  * @example
804
- * Creating an action row from an API data object:
830
+ * Creating a media gallery from an API data object:
805
831
  * ```ts
806
- * const actionRow = new ActionRowBuilder({
807
- * components: [
832
+ * const mediaGallery = new MediaGalleryBuilder({
833
+ * items: [
808
834
  * {
809
- * custom_id: "custom id",
810
- * label: "Type something",
811
- * style: TextInputStyle.Short,
812
- * type: ComponentType.TextInput,
835
+ * description: "Some text here",
836
+ * media: {
837
+ * url: 'https://cdn.discordapp.com/embed/avatars/2.png',
838
+ * },
813
839
  * },
814
840
  * ],
815
841
  * });
816
842
  * ```
817
843
  * @example
818
- * Creating an action row using setters and API data:
844
+ * Creating a media gallery using setters and API data:
819
845
  * ```ts
820
- * const actionRow = new ActionRowBuilder({
821
- * components: [
846
+ * const mediaGallery = new MediaGalleryBuilder({
847
+ * items: [
822
848
  * {
823
- * custom_id: "custom id",
824
- * label: "Click me",
825
- * style: ButtonStyle.Primary,
826
- * type: ComponentType.Button,
849
+ * description: "alt text",
850
+ * media: {
851
+ * url: 'https://cdn.discordapp.com/embed/avatars/5.png',
852
+ * },
827
853
  * },
828
854
  * ],
829
855
  * })
830
- * .addComponents(button2, button3);
856
+ * .addItems(item2, item3);
831
857
  * ```
832
858
  */
833
- constructor({ components, ...data }?: Partial<APIActionRowComponent<APIActionRowComponentTypes>>);
859
+ constructor(data?: Partial<APIMediaGalleryComponent>);
834
860
  /**
835
- * Adds primary button components to this action row.
836
- *
837
- * @param input - The buttons to add
861
+ * The items in this media gallery.
838
862
  */
839
- addPrimaryButtonComponents(...input: RestOrArray<APIButtonComponentWithCustomId | PrimaryButtonBuilder | ((builder: PrimaryButtonBuilder) => PrimaryButtonBuilder)>): this;
863
+ get items(): readonly MediaGalleryItemBuilder[];
840
864
  /**
841
- * Adds secondary button components to this action row.
865
+ * Adds a media gallery item to this media gallery.
842
866
  *
843
- * @param input - The buttons to add
867
+ * @param input - The items to add
844
868
  */
845
- addSecondaryButtonComponents(...input: RestOrArray<APIButtonComponentWithCustomId | SecondaryButtonBuilder | ((builder: SecondaryButtonBuilder) => SecondaryButtonBuilder)>): this;
869
+ addItems(...input: RestOrArray<APIMediaGalleryItem | MediaGalleryItemBuilder | ((builder: MediaGalleryItemBuilder) => MediaGalleryItemBuilder)>): this;
846
870
  /**
847
- * Adds success button components to this action row.
871
+ * Removes, replaces, or inserts media gallery items for this media gallery.
848
872
  *
849
- * @param input - The buttons to add
873
+ * @param index - The index to start removing, replacing or inserting items
874
+ * @param deleteCount - The amount of items to remove
875
+ * @param items - The items to insert
850
876
  */
851
- addSuccessButtonComponents(...input: RestOrArray<APIButtonComponentWithCustomId | SuccessButtonBuilder | ((builder: SuccessButtonBuilder) => SuccessButtonBuilder)>): this;
877
+ spliceItems(index: number, deleteCount: number, ...items: RestOrArray<APIMediaGalleryItem | MediaGalleryItemBuilder | ((builder: MediaGalleryItemBuilder) => MediaGalleryItemBuilder)>): this;
852
878
  /**
853
- * Adds danger button components to this action row.
879
+ * {@inheritDoc ComponentBuilder.toJSON}
854
880
  */
855
- addDangerButtonComponents(...input: RestOrArray<APIButtonComponentWithCustomId | DangerButtonBuilder | ((builder: DangerButtonBuilder) => DangerButtonBuilder)>): this;
881
+ toJSON(validationOverride?: boolean): APIMediaGalleryComponent;
882
+ }
883
+
884
+ declare class TextDisplayBuilder extends ComponentBuilder<APITextDisplayComponent> {
885
+ protected readonly data: Partial<APITextDisplayComponent>;
856
886
  /**
857
- * Generically add any type of component to this action row, only takes in an instance of a component builder.
887
+ * Creates a new text display from API data.
888
+ *
889
+ * @param data - The API data to create this text display with
890
+ * @example
891
+ * Creating a text display from an API data object:
892
+ * ```ts
893
+ * const textDisplay = new TextDisplayBuilder({
894
+ * content: 'some text',
895
+ * });
896
+ * ```
897
+ * @example
898
+ * Creating a text display using setters and API data:
899
+ * ```ts
900
+ * const textDisplay = new TextDisplayBuilder({
901
+ * content: 'old text',
902
+ * })
903
+ * .setContent('new text');
904
+ * ```
858
905
  */
859
- addComponents(...input: RestOrArray<AnyActionRowComponentBuilder>): this;
906
+ constructor(data?: Partial<APITextDisplayComponent>);
860
907
  /**
861
- * Adds SKU id button components to this action row.
908
+ * Sets the text of this text display.
862
909
  *
863
- * @param input - The buttons to add
910
+ * @param content - The text to use
864
911
  */
865
- addPremiumButtonComponents(...input: RestOrArray<APIButtonComponentWithSKUId | PremiumButtonBuilder | ((builder: PremiumButtonBuilder) => PremiumButtonBuilder)>): this;
912
+ setContent(content: string): this;
866
913
  /**
867
- * Adds URL button components to this action row.
868
- *
869
- * @param input - The buttons to add
914
+ * {@inheritDoc ComponentBuilder.toJSON}
870
915
  */
871
- addLinkButtonComponents(...input: RestOrArray<APIButtonComponentWithURL | LinkButtonBuilder | ((builder: LinkButtonBuilder) => LinkButtonBuilder)>): this;
916
+ toJSON(validationOverride?: boolean): APITextDisplayComponent;
917
+ }
918
+
919
+ declare class ThumbnailBuilder extends ComponentBuilder<APIThumbnailComponent> {
920
+ protected readonly data: Partial<APIThumbnailComponent>;
872
921
  /**
873
- * Adds a channel select menu component to this action row.
922
+ * Creates a new thumbnail from API data.
874
923
  *
875
- * @param input - A function that returns a component builder or an already built builder
924
+ * @param data - The API data to create this thumbnail with
925
+ * @example
926
+ * Creating a thumbnail from an API data object:
927
+ * ```ts
928
+ * const thumbnail = new ThumbnailBuilder({
929
+ * description: 'some text',
930
+ * media: {
931
+ * url: 'https://cdn.discordapp.com/embed/avatars/4.png',
932
+ * },
933
+ * });
934
+ * ```
935
+ * @example
936
+ * Creating a thumbnail using setters and API data:
937
+ * ```ts
938
+ * const thumbnail = new ThumbnailBuilder({
939
+ * media: {
940
+ * url: 'attachment://image.png',
941
+ * },
942
+ * })
943
+ * .setDescription('alt text');
944
+ * ```
876
945
  */
877
- addChannelSelectMenuComponent(input: APIChannelSelectComponent | ChannelSelectMenuBuilder | ((builder: ChannelSelectMenuBuilder) => ChannelSelectMenuBuilder)): this;
946
+ constructor(data?: Partial<APIThumbnailComponent>);
878
947
  /**
879
- * Adds a mentionable select menu component to this action row.
948
+ * Sets the description of this thumbnail.
880
949
  *
881
- * @param input - A function that returns a component builder or an already built builder
950
+ * @param description - The description to use
882
951
  */
883
- addMentionableSelectMenuComponent(input: APIMentionableSelectComponent | MentionableSelectMenuBuilder | ((builder: MentionableSelectMenuBuilder) => MentionableSelectMenuBuilder)): this;
952
+ setDescription(description: string): this;
884
953
  /**
885
- * Adds a role select menu component to this action row.
886
- *
887
- * @param input - A function that returns a component builder or an already built builder
954
+ * Clears the description of this thumbnail.
888
955
  */
889
- addRoleSelectMenuComponent(input: APIRoleSelectComponent | RoleSelectMenuBuilder | ((builder: RoleSelectMenuBuilder) => RoleSelectMenuBuilder)): this;
956
+ clearDescription(): this;
890
957
  /**
891
- * Adds a string select menu component to this action row.
958
+ * Sets the spoiler status of this thumbnail.
892
959
  *
893
- * @param input - A function that returns a component builder or an already built builder
960
+ * @param spoiler - The spoiler status to use
894
961
  */
895
- addStringSelectMenuComponent(input: APIStringSelectComponent | StringSelectMenuBuilder | ((builder: StringSelectMenuBuilder) => StringSelectMenuBuilder)): this;
962
+ setSpoiler(spoiler?: boolean): this;
896
963
  /**
897
- * Adds a user select menu component to this action row.
964
+ * Sets the media URL of this thumbnail.
898
965
  *
899
- * @param input - A function that returns a component builder or an already built builder
966
+ * @param url - The URL to use
900
967
  */
901
- addUserSelectMenuComponent(input: APIUserSelectComponent | UserSelectMenuBuilder | ((builder: UserSelectMenuBuilder) => UserSelectMenuBuilder)): this;
968
+ setURL(url: string): this;
902
969
  /**
903
- * Adds a text input component to this action row.
904
- *
905
- * @param input - A function that returns a component builder or an already built builder
970
+ * {@inheritdoc ComponentBuilder.toJSON}
906
971
  */
907
- addTextInputComponent(input: APITextInputComponent | TextInputBuilder | ((builder: TextInputBuilder) => TextInputBuilder)): this;
972
+ toJSON(validationOverride?: boolean): APIThumbnailComponent;
973
+ }
974
+
975
+ type SectionBuilderAccessory = ButtonBuilder | ThumbnailBuilder;
976
+ interface SectionBuilderData extends Partial<Omit<APISectionComponent, 'accessory' | 'components'>> {
977
+ accessory?: SectionBuilderAccessory;
978
+ components: TextDisplayBuilder[];
979
+ }
980
+ declare class SectionBuilder extends ComponentBuilder<APISectionComponent> {
981
+ protected readonly data: SectionBuilderData;
982
+ get components(): readonly TextDisplayBuilder[];
908
983
  /**
909
- * Removes, replaces, or inserts components for this action row.
910
- *
911
- * @remarks
912
- * This method behaves similarly
913
- * to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
984
+ * Creates a new section from API data.
914
985
  *
915
- * It's useful for modifying and adjusting order of the already-existing components of an action row.
916
- * @example
917
- * Remove the first component:
918
- * ```ts
919
- * actionRow.spliceComponents(0, 1);
920
- * ```
986
+ * @param data - The API data to create this section with
921
987
  * @example
922
- * Remove the first n components:
988
+ * Creating a section from an API data object:
923
989
  * ```ts
924
- * const n = 4;
925
- * actionRow.spliceComponents(0, n);
990
+ * const section = new SectionBuilder({
991
+ * components: [
992
+ * {
993
+ * content: "Some text here",
994
+ * type: ComponentType.TextDisplay,
995
+ * },
996
+ * ],
997
+ * accessory: {
998
+ * media: {
999
+ * url: 'https://cdn.discordapp.com/embed/avatars/3.png',
1000
+ * },
1001
+ * }
1002
+ * });
926
1003
  * ```
927
1004
  * @example
928
- * Remove the last component:
1005
+ * Creating a section using setters and API data:
929
1006
  * ```ts
930
- * actionRow.spliceComponents(-1, 1);
1007
+ * const section = new SectionBuilder({
1008
+ * components: [
1009
+ * {
1010
+ * content: "# Heading",
1011
+ * type: ComponentType.TextDisplay,
1012
+ * },
1013
+ * ],
1014
+ * })
1015
+ * .setPrimaryButtonAccessory(button);
931
1016
  * ```
932
- * @param index - The index to start at
933
- * @param deleteCount - The number of components to remove
934
- * @param components - The replacing component objects
935
1017
  */
936
- spliceComponents(index: number, deleteCount: number, ...components: AnyActionRowComponentBuilder[]): this;
1018
+ constructor(data?: Partial<APISectionComponent>);
937
1019
  /**
938
- * {@inheritDoc ComponentBuilder.toJSON}
1020
+ * Adds text display components to this section.
1021
+ *
1022
+ * @param input - The text display components to add
939
1023
  */
940
- toJSON(validationOverride?: boolean): APIActionRowComponent<APIActionRowComponentTypes>;
941
- }
942
-
943
- declare const emojiPredicate: z.ZodEffects<z.ZodObject<{
944
- id: z.ZodOptional<z.ZodString>;
945
- name: z.ZodOptional<z.ZodString>;
946
- animated: z.ZodOptional<z.ZodBoolean>;
947
- }, "strict", z.ZodTypeAny, {
948
- id?: string | undefined;
949
- name?: string | undefined;
950
- animated?: boolean | undefined;
951
- }, {
952
- id?: string | undefined;
953
- name?: string | undefined;
954
- animated?: boolean | undefined;
955
- }>, {
956
- id?: string | undefined;
1024
+ addTextDisplayComponents(...input: RestOrArray<APITextDisplayComponent | TextDisplayBuilder | ((builder: TextDisplayBuilder) => TextDisplayBuilder)>): this;
1025
+ /**
1026
+ * Sets a primary button component to be the accessory of this section.
1027
+ *
1028
+ * @param input - The button to set as the accessory
1029
+ */
1030
+ setPrimaryButtonAccessory(input: PrimaryButtonBuilder | ((builder: PrimaryButtonBuilder) => PrimaryButtonBuilder) | (APIButtonComponentWithCustomId & {
1031
+ style: ButtonStyle.Primary;
1032
+ })): this;
1033
+ /**
1034
+ * Sets a secondary button component to be the accessory of this section.
1035
+ *
1036
+ * @param input - The button to set as the accessory
1037
+ */
1038
+ setSecondaryButtonAccessory(input: SecondaryButtonBuilder | ((builder: SecondaryButtonBuilder) => SecondaryButtonBuilder) | (APIButtonComponentWithCustomId & {
1039
+ style: ButtonStyle.Secondary;
1040
+ })): this;
1041
+ /**
1042
+ * Sets a success button component to be the accessory of this section.
1043
+ *
1044
+ * @param input - The button to set as the accessory
1045
+ */
1046
+ setSuccessButtonAccessory(input: SuccessButtonBuilder | ((builder: SuccessButtonBuilder) => SuccessButtonBuilder) | (APIButtonComponentWithCustomId & {
1047
+ style: ButtonStyle.Success;
1048
+ })): this;
1049
+ /**
1050
+ * Sets a danger button component to be the accessory of this section.
1051
+ *
1052
+ * @param input - The button to set as the accessory
1053
+ */
1054
+ setDangerButtonAccessory(input: DangerButtonBuilder | ((builder: DangerButtonBuilder) => DangerButtonBuilder) | (APIButtonComponentWithCustomId & {
1055
+ style: ButtonStyle.Danger;
1056
+ })): this;
1057
+ /**
1058
+ * Sets a SKU id button component to be the accessory of this section.
1059
+ *
1060
+ * @param input - The button to set as the accessory
1061
+ */
1062
+ setPremiumButtonAccessory(input: APIButtonComponentWithSKUId | PremiumButtonBuilder | ((builder: PremiumButtonBuilder) => PremiumButtonBuilder)): this;
1063
+ /**
1064
+ * Sets a URL button component to be the accessory of this section.
1065
+ *
1066
+ * @param input - The button to set as the accessory
1067
+ */
1068
+ setLinkButtonAccessory(input: APIButtonComponentWithURL | LinkButtonBuilder | ((builder: LinkButtonBuilder) => LinkButtonBuilder)): this;
1069
+ /**
1070
+ * Sets a thumbnail component to be the accessory of this section.
1071
+ *
1072
+ * @param input - The thumbnail to set as the accessory
1073
+ */
1074
+ setThumbnailAccessory(input: APIThumbnailComponent | ThumbnailBuilder | ((builder: ThumbnailBuilder) => ThumbnailBuilder)): this;
1075
+ /**
1076
+ * Removes, replaces, or inserts text display components for this section.
1077
+ *
1078
+ * @param index - The index to start removing, replacing or inserting text display components
1079
+ * @param deleteCount - The amount of text display components to remove
1080
+ * @param components - The text display components to insert
1081
+ */
1082
+ spliceTextDisplayComponents(index: number, deleteCount: number, ...components: RestOrArray<APITextDisplayComponent | TextDisplayBuilder | ((builder: TextDisplayBuilder) => TextDisplayBuilder)>): this;
1083
+ /**
1084
+ * {@inheritDoc ComponentBuilder.toJSON}
1085
+ */
1086
+ toJSON(validationOverride?: boolean): APISectionComponent;
1087
+ }
1088
+
1089
+ declare class SeparatorBuilder extends ComponentBuilder<APISeparatorComponent> {
1090
+ protected readonly data: Partial<APISeparatorComponent>;
1091
+ /**
1092
+ * Creates a new separator from API data.
1093
+ *
1094
+ * @param data - The API data to create this separator with
1095
+ * @example
1096
+ * Creating a separator from an API data object:
1097
+ * ```ts
1098
+ * const separator = new SeparatorBuilder({
1099
+ * spacing: SeparatorSpacingSize.Small,
1100
+ * divider: true,
1101
+ * });
1102
+ * ```
1103
+ * @example
1104
+ * Creating a separator using setters and API data:
1105
+ * ```ts
1106
+ * const separator = new SeparatorBuilder({
1107
+ * spacing: SeparatorSpacingSize.Large,
1108
+ * })
1109
+ * .setDivider(false);
1110
+ * ```
1111
+ */
1112
+ constructor(data?: Partial<APISeparatorComponent>);
1113
+ /**
1114
+ * Sets whether this separator should show a divider line.
1115
+ *
1116
+ * @param divider - Whether to show a divider line
1117
+ */
1118
+ setDivider(divider?: boolean): this;
1119
+ /**
1120
+ * Sets the spacing of this separator.
1121
+ *
1122
+ * @param spacing - The spacing to use
1123
+ */
1124
+ setSpacing(spacing: SeparatorSpacingSize): this;
1125
+ /**
1126
+ * Clears the spacing of this separator.
1127
+ */
1128
+ clearSpacing(): this;
1129
+ /**
1130
+ * {@inheritDoc ComponentBuilder.toJSON}
1131
+ */
1132
+ toJSON(validationOverride?: boolean): APISeparatorComponent;
1133
+ }
1134
+
1135
+ type ContainerComponentBuilders = ActionRowBuilder | FileBuilder | MediaGalleryBuilder | SectionBuilder | SeparatorBuilder | TextDisplayBuilder;
1136
+ interface ContainerBuilderData extends Partial<Omit<APIContainerComponent, 'components'>> {
1137
+ components: ContainerComponentBuilders[];
1138
+ }
1139
+ declare class ContainerBuilder extends ComponentBuilder<APIContainerComponent> {
1140
+ protected readonly data: ContainerBuilderData;
1141
+ constructor({ components, ...rest }?: Partial<APIContainerComponent>);
1142
+ /**
1143
+ * Sets the accent color of this container.
1144
+ *
1145
+ * @param color - The color to use
1146
+ */
1147
+ setAccentColor(color: number): this;
1148
+ /**
1149
+ * Clears the accent color of this container.
1150
+ */
1151
+ clearAccentColor(): this;
1152
+ /**
1153
+ * Sets the spoiler status of this container.
1154
+ *
1155
+ * @param spoiler - The spoiler status to use
1156
+ */
1157
+ setSpoiler(spoiler?: boolean): this;
1158
+ /**
1159
+ * Adds action row components to this container.
1160
+ *
1161
+ * @param input - The action row to add
1162
+ */
1163
+ addActionRowComponents(...input: RestOrArray<ActionRowBuilder | APIActionRowComponent<APIComponentInMessageActionRow> | ((builder: ActionRowBuilder) => ActionRowBuilder)>): this;
1164
+ /**
1165
+ * Adds file components to this container.
1166
+ *
1167
+ * @param input - The file components to add
1168
+ */
1169
+ addFileComponents(...input: RestOrArray<APIFileComponent | FileBuilder | ((builder: FileBuilder) => FileBuilder)>): this;
1170
+ /**
1171
+ * Adds media gallery components to this container.
1172
+ *
1173
+ * @param input - The media gallery components to add
1174
+ */
1175
+ addMediaGalleryComponents(...input: RestOrArray<APIMediaGalleryComponent | MediaGalleryBuilder | ((builder: MediaGalleryBuilder) => MediaGalleryBuilder)>): this;
1176
+ /**
1177
+ * Adds section components to this container.
1178
+ *
1179
+ * @param input - The section components to add
1180
+ */
1181
+ addSectionComponents(...input: RestOrArray<APISectionComponent | SectionBuilder | ((builder: SectionBuilder) => SectionBuilder)>): this;
1182
+ /**
1183
+ * Adds separator components to this container.
1184
+ *
1185
+ * @param input - The separator components to add
1186
+ */
1187
+ addSeparatorComponents(...input: RestOrArray<APISeparatorComponent$1 | SeparatorBuilder | ((builder: SeparatorBuilder) => SeparatorBuilder)>): this;
1188
+ /**
1189
+ * Adds text display components to this container.
1190
+ *
1191
+ * @param input - The text display components to add
1192
+ */
1193
+ addTextDisplayComponents(...input: RestOrArray<APITextDisplayComponent | TextDisplayBuilder | ((builder: TextDisplayBuilder) => TextDisplayBuilder)>): this;
1194
+ /**
1195
+ * Removes, replaces, or inserts components for this container
1196
+ *
1197
+ * @remarks
1198
+ * This method behaves similarly
1199
+ * to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
1200
+ *
1201
+ * It's useful for modifying and adjusting order of the already-existing components of a container.
1202
+ * @example
1203
+ * Remove the first component:
1204
+ * ```ts
1205
+ * container.spliceComponents(0, 1);
1206
+ * ```
1207
+ * @example
1208
+ * Remove the first n components:
1209
+ * ```ts
1210
+ * const n = 4;
1211
+ * container.spliceComponents(0, n);
1212
+ * ```
1213
+ * @example
1214
+ * Remove the last component:
1215
+ * ```ts
1216
+ * container.spliceComponents(-1, 1);
1217
+ * ```
1218
+ * @param index - The index to start at
1219
+ * @param deleteCount - The number of components to remove
1220
+ * @param components - The replacing component objects
1221
+ */
1222
+ spliceComponents(index: number, deleteCount: number, ...components: RestOrArray<APIComponentInContainer | ContainerComponentBuilders>): this;
1223
+ /**
1224
+ * {@inheritDoc ComponentBuilder.toJSON}
1225
+ */
1226
+ toJSON(validationOverride?: boolean): APIContainerComponent;
1227
+ }
1228
+
1229
+ /**
1230
+ * The builders that may be used as top-level components on messages
1231
+ */
1232
+ type MessageTopLevelComponentBuilder = ActionRowBuilder | ContainerBuilder | FileBuilder | MediaGalleryBuilder | SectionBuilder | SeparatorBuilder | TextDisplayBuilder;
1233
+ /**
1234
+ * The builders that may be used for messages.
1235
+ */
1236
+ type MessageComponentBuilder = MessageActionRowComponentBuilder | MessageTopLevelComponentBuilder | ThumbnailBuilder;
1237
+ /**
1238
+ * The builders that may be used for modals.
1239
+ */
1240
+ type ModalComponentBuilder = ActionRowBuilder | ModalActionRowComponentBuilder;
1241
+ /**
1242
+ * Any button builder
1243
+ */
1244
+ type ButtonBuilder = DangerButtonBuilder | LinkButtonBuilder | PremiumButtonBuilder | PrimaryButtonBuilder | SecondaryButtonBuilder | SuccessButtonBuilder;
1245
+ /**
1246
+ * The builders that may be used within an action row for messages.
1247
+ */
1248
+ type MessageActionRowComponentBuilder = ButtonBuilder | ChannelSelectMenuBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | UserSelectMenuBuilder;
1249
+ /**
1250
+ * The builders that may be used within an action row for modals.
1251
+ */
1252
+ type ModalActionRowComponentBuilder = TextInputBuilder;
1253
+ /**
1254
+ * Any action row component builder.
1255
+ */
1256
+ type AnyActionRowComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder;
1257
+ /**
1258
+ * Components here are mapped to their respective builder.
1259
+ */
1260
+ interface MappedComponentTypes {
1261
+ /**
1262
+ * The action row component type is associated with an {@link ActionRowBuilder}.
1263
+ */
1264
+ [ComponentType.ActionRow]: ActionRowBuilder;
1265
+ /**
1266
+ * The button component type is associated with a {@link BaseButtonBuilder}.
1267
+ */
1268
+ [ComponentType.Button]: ButtonBuilder;
1269
+ /**
1270
+ * The string select component type is associated with a {@link StringSelectMenuBuilder}.
1271
+ */
1272
+ [ComponentType.StringSelect]: StringSelectMenuBuilder;
1273
+ /**
1274
+ * The text input component type is associated with a {@link TextInputBuilder}.
1275
+ */
1276
+ [ComponentType.TextInput]: TextInputBuilder;
1277
+ /**
1278
+ * The user select component type is associated with a {@link UserSelectMenuBuilder}.
1279
+ */
1280
+ [ComponentType.UserSelect]: UserSelectMenuBuilder;
1281
+ /**
1282
+ * The role select component type is associated with a {@link RoleSelectMenuBuilder}.
1283
+ */
1284
+ [ComponentType.RoleSelect]: RoleSelectMenuBuilder;
1285
+ /**
1286
+ * The mentionable select component type is associated with a {@link MentionableSelectMenuBuilder}.
1287
+ */
1288
+ [ComponentType.MentionableSelect]: MentionableSelectMenuBuilder;
1289
+ /**
1290
+ * The channel select component type is associated with a {@link ChannelSelectMenuBuilder}.
1291
+ */
1292
+ [ComponentType.ChannelSelect]: ChannelSelectMenuBuilder;
1293
+ /**
1294
+ * The thumbnail component type is associated with a {@link ThumbnailBuilder}.
1295
+ */
1296
+ [ComponentType.Thumbnail]: ThumbnailBuilder;
1297
+ /**
1298
+ * The file component type is associated with a {@link FileBuilder}.
1299
+ */
1300
+ [ComponentType.File]: FileBuilder;
1301
+ /**
1302
+ * The separator component type is associated with a {@link SeparatorBuilder}.
1303
+ */
1304
+ [ComponentType.Separator]: SeparatorBuilder;
1305
+ /**
1306
+ * The text display component type is associated with a {@link TextDisplayBuilder}.
1307
+ */
1308
+ [ComponentType.TextDisplay]: TextDisplayBuilder;
1309
+ /**
1310
+ * The media gallery component type is associated with a {@link MediaGalleryBuilder}.
1311
+ */
1312
+ [ComponentType.MediaGallery]: MediaGalleryBuilder;
1313
+ /**
1314
+ * The section component type is associated with a {@link SectionBuilder}.
1315
+ */
1316
+ [ComponentType.Section]: SectionBuilder;
1317
+ /**
1318
+ * The container component type is associated with a {@link ContainerBuilder}.
1319
+ */
1320
+ [ComponentType.Container]: ContainerBuilder;
1321
+ }
1322
+ /**
1323
+ * Factory for creating components from API data.
1324
+ *
1325
+ * @typeParam ComponentType - The type of component to use
1326
+ * @param data - The API data to transform to a component class
1327
+ */
1328
+ declare function createComponentBuilder<ComponentType extends keyof MappedComponentTypes>(data: (APIModalComponent | APIMessageComponent) & {
1329
+ type: ComponentType;
1330
+ }): MappedComponentTypes[ComponentType];
1331
+ /**
1332
+ * Factory for creating components from API data.
1333
+ *
1334
+ * @typeParam ComponentBuilder - The type of component to use
1335
+ * @param data - The API data to transform to a component class
1336
+ */
1337
+ declare function createComponentBuilder<ComponentBuilder extends MessageComponentBuilder | ModalComponentBuilder>(data: ComponentBuilder): ComponentBuilder;
1338
+ declare function resolveAccessoryComponent(component: APISectionAccessoryComponent): ThumbnailBuilder | ButtonBuilder;
1339
+
1340
+ interface ActionRowBuilderData extends Partial<Omit<APIActionRowComponent<APIComponentInActionRow>, 'components'>> {
1341
+ components: AnyActionRowComponentBuilder[];
1342
+ }
1343
+ /**
1344
+ * A builder that creates API-compatible JSON data for action rows.
1345
+ *
1346
+ * @typeParam ComponentType - The types of components this action row holds
1347
+ */
1348
+ declare class ActionRowBuilder extends ComponentBuilder<APIActionRowComponent<APIComponentInActionRow>> {
1349
+ protected readonly data: ActionRowBuilderData;
1350
+ /**
1351
+ * The components within this action row.
1352
+ */
1353
+ get components(): readonly AnyActionRowComponentBuilder[];
1354
+ /**
1355
+ * Creates a new action row from API data.
1356
+ *
1357
+ * @param data - The API data to create this action row with
1358
+ * @example
1359
+ * Creating an action row from an API data object:
1360
+ * ```ts
1361
+ * const actionRow = new ActionRowBuilder({
1362
+ * components: [
1363
+ * {
1364
+ * custom_id: "custom id",
1365
+ * label: "Type something",
1366
+ * style: TextInputStyle.Short,
1367
+ * type: ComponentType.TextInput,
1368
+ * },
1369
+ * ],
1370
+ * });
1371
+ * ```
1372
+ * @example
1373
+ * Creating an action row using setters and API data:
1374
+ * ```ts
1375
+ * const actionRow = new ActionRowBuilder({
1376
+ * components: [
1377
+ * {
1378
+ * custom_id: "custom id",
1379
+ * label: "Click me",
1380
+ * style: ButtonStyle.Primary,
1381
+ * type: ComponentType.Button,
1382
+ * },
1383
+ * ],
1384
+ * })
1385
+ * .addComponents(button2, button3);
1386
+ * ```
1387
+ */
1388
+ constructor({ components, ...data }?: Partial<APIActionRowComponent<APIComponentInActionRow>>);
1389
+ /**
1390
+ * Adds primary button components to this action row.
1391
+ *
1392
+ * @param input - The buttons to add
1393
+ */
1394
+ addPrimaryButtonComponents(...input: RestOrArray<APIButtonComponentWithCustomId | PrimaryButtonBuilder | ((builder: PrimaryButtonBuilder) => PrimaryButtonBuilder)>): this;
1395
+ /**
1396
+ * Adds secondary button components to this action row.
1397
+ *
1398
+ * @param input - The buttons to add
1399
+ */
1400
+ addSecondaryButtonComponents(...input: RestOrArray<APIButtonComponentWithCustomId | SecondaryButtonBuilder | ((builder: SecondaryButtonBuilder) => SecondaryButtonBuilder)>): this;
1401
+ /**
1402
+ * Adds success button components to this action row.
1403
+ *
1404
+ * @param input - The buttons to add
1405
+ */
1406
+ addSuccessButtonComponents(...input: RestOrArray<APIButtonComponentWithCustomId | SuccessButtonBuilder | ((builder: SuccessButtonBuilder) => SuccessButtonBuilder)>): this;
1407
+ /**
1408
+ * Adds danger button components to this action row.
1409
+ */
1410
+ addDangerButtonComponents(...input: RestOrArray<APIButtonComponentWithCustomId | DangerButtonBuilder | ((builder: DangerButtonBuilder) => DangerButtonBuilder)>): this;
1411
+ /**
1412
+ * Generically add any type of component to this action row, only takes in an instance of a component builder.
1413
+ */
1414
+ addComponents(...input: RestOrArray<AnyActionRowComponentBuilder>): this;
1415
+ /**
1416
+ * Adds SKU id button components to this action row.
1417
+ *
1418
+ * @param input - The buttons to add
1419
+ */
1420
+ addPremiumButtonComponents(...input: RestOrArray<APIButtonComponentWithSKUId | PremiumButtonBuilder | ((builder: PremiumButtonBuilder) => PremiumButtonBuilder)>): this;
1421
+ /**
1422
+ * Adds URL button components to this action row.
1423
+ *
1424
+ * @param input - The buttons to add
1425
+ */
1426
+ addLinkButtonComponents(...input: RestOrArray<APIButtonComponentWithURL | LinkButtonBuilder | ((builder: LinkButtonBuilder) => LinkButtonBuilder)>): this;
1427
+ /**
1428
+ * Adds a channel select menu component to this action row.
1429
+ *
1430
+ * @param input - A function that returns a component builder or an already built builder
1431
+ */
1432
+ addChannelSelectMenuComponent(input: APIChannelSelectComponent | ChannelSelectMenuBuilder | ((builder: ChannelSelectMenuBuilder) => ChannelSelectMenuBuilder)): this;
1433
+ /**
1434
+ * Adds a mentionable select menu component to this action row.
1435
+ *
1436
+ * @param input - A function that returns a component builder or an already built builder
1437
+ */
1438
+ addMentionableSelectMenuComponent(input: APIMentionableSelectComponent | MentionableSelectMenuBuilder | ((builder: MentionableSelectMenuBuilder) => MentionableSelectMenuBuilder)): this;
1439
+ /**
1440
+ * Adds a role select menu component to this action row.
1441
+ *
1442
+ * @param input - A function that returns a component builder or an already built builder
1443
+ */
1444
+ addRoleSelectMenuComponent(input: APIRoleSelectComponent | RoleSelectMenuBuilder | ((builder: RoleSelectMenuBuilder) => RoleSelectMenuBuilder)): this;
1445
+ /**
1446
+ * Adds a string select menu component to this action row.
1447
+ *
1448
+ * @param input - A function that returns a component builder or an already built builder
1449
+ */
1450
+ addStringSelectMenuComponent(input: APIStringSelectComponent | StringSelectMenuBuilder | ((builder: StringSelectMenuBuilder) => StringSelectMenuBuilder)): this;
1451
+ /**
1452
+ * Adds a user select menu component to this action row.
1453
+ *
1454
+ * @param input - A function that returns a component builder or an already built builder
1455
+ */
1456
+ addUserSelectMenuComponent(input: APIUserSelectComponent | UserSelectMenuBuilder | ((builder: UserSelectMenuBuilder) => UserSelectMenuBuilder)): this;
1457
+ /**
1458
+ * Adds a text input component to this action row.
1459
+ *
1460
+ * @param input - A function that returns a component builder or an already built builder
1461
+ */
1462
+ addTextInputComponent(input: APITextInputComponent | TextInputBuilder | ((builder: TextInputBuilder) => TextInputBuilder)): this;
1463
+ /**
1464
+ * Removes, replaces, or inserts components for this action row.
1465
+ *
1466
+ * @remarks
1467
+ * This method behaves similarly
1468
+ * to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
1469
+ *
1470
+ * It's useful for modifying and adjusting order of the already-existing components of an action row.
1471
+ * @example
1472
+ * Remove the first component:
1473
+ * ```ts
1474
+ * actionRow.spliceComponents(0, 1);
1475
+ * ```
1476
+ * @example
1477
+ * Remove the first n components:
1478
+ * ```ts
1479
+ * const n = 4;
1480
+ * actionRow.spliceComponents(0, n);
1481
+ * ```
1482
+ * @example
1483
+ * Remove the last component:
1484
+ * ```ts
1485
+ * actionRow.spliceComponents(-1, 1);
1486
+ * ```
1487
+ * @param index - The index to start at
1488
+ * @param deleteCount - The number of components to remove
1489
+ * @param components - The replacing component objects
1490
+ */
1491
+ spliceComponents(index: number, deleteCount: number, ...components: AnyActionRowComponentBuilder[]): this;
1492
+ /**
1493
+ * {@inheritDoc ComponentBuilder.toJSON}
1494
+ */
1495
+ toJSON(validationOverride?: boolean): APIActionRowComponent<APIComponentInActionRow>;
1496
+ }
1497
+
1498
+ declare const emojiPredicate: z.ZodEffects<z.ZodObject<{
1499
+ id: z.ZodOptional<z.ZodString>;
1500
+ name: z.ZodOptional<z.ZodString>;
1501
+ animated: z.ZodOptional<z.ZodBoolean>;
1502
+ }, "strict", z.ZodTypeAny, {
1503
+ id?: string | undefined;
1504
+ name?: string | undefined;
1505
+ animated?: boolean | undefined;
1506
+ }, {
1507
+ id?: string | undefined;
1508
+ name?: string | undefined;
1509
+ animated?: boolean | undefined;
1510
+ }>, {
1511
+ id?: string | undefined;
957
1512
  name?: string | undefined;
958
1513
  animated?: boolean | undefined;
959
1514
  }, {
@@ -1605,6 +2160,394 @@ declare const actionRowPredicate: z.ZodObject<{
1605
2160
  }[];
1606
2161
  }>;
1607
2162
 
2163
+ declare const thumbnailPredicate: z.ZodObject<{
2164
+ media: z.ZodObject<{
2165
+ url: z.ZodEffects<z.ZodString, string, string>;
2166
+ }, "strip", z.ZodTypeAny, {
2167
+ url: string;
2168
+ }, {
2169
+ url: string;
2170
+ }>;
2171
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2172
+ spoiler: z.ZodOptional<z.ZodBoolean>;
2173
+ }, "strip", z.ZodTypeAny, {
2174
+ media: {
2175
+ url: string;
2176
+ };
2177
+ description?: string | null | undefined;
2178
+ spoiler?: boolean | undefined;
2179
+ }, {
2180
+ media: {
2181
+ url: string;
2182
+ };
2183
+ description?: string | null | undefined;
2184
+ spoiler?: boolean | undefined;
2185
+ }>;
2186
+ declare const filePredicate: z.ZodObject<{
2187
+ file: z.ZodObject<{
2188
+ url: z.ZodEffects<z.ZodString, string, string>;
2189
+ }, "strip", z.ZodTypeAny, {
2190
+ url: string;
2191
+ }, {
2192
+ url: string;
2193
+ }>;
2194
+ spoiler: z.ZodOptional<z.ZodBoolean>;
2195
+ }, "strip", z.ZodTypeAny, {
2196
+ file: {
2197
+ url: string;
2198
+ };
2199
+ spoiler?: boolean | undefined;
2200
+ }, {
2201
+ file: {
2202
+ url: string;
2203
+ };
2204
+ spoiler?: boolean | undefined;
2205
+ }>;
2206
+ declare const separatorPredicate: z.ZodObject<{
2207
+ divider: z.ZodOptional<z.ZodBoolean>;
2208
+ spacing: z.ZodOptional<z.ZodNativeEnum<typeof SeparatorSpacingSize>>;
2209
+ }, "strip", z.ZodTypeAny, {
2210
+ divider?: boolean | undefined;
2211
+ spacing?: SeparatorSpacingSize | undefined;
2212
+ }, {
2213
+ divider?: boolean | undefined;
2214
+ spacing?: SeparatorSpacingSize | undefined;
2215
+ }>;
2216
+ declare const textDisplayPredicate: z.ZodObject<{
2217
+ content: z.ZodString;
2218
+ }, "strip", z.ZodTypeAny, {
2219
+ content: string;
2220
+ }, {
2221
+ content: string;
2222
+ }>;
2223
+ declare const mediaGalleryItemPredicate: z.ZodObject<{
2224
+ media: z.ZodObject<{
2225
+ url: z.ZodEffects<z.ZodString, string, string>;
2226
+ }, "strip", z.ZodTypeAny, {
2227
+ url: string;
2228
+ }, {
2229
+ url: string;
2230
+ }>;
2231
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2232
+ spoiler: z.ZodOptional<z.ZodBoolean>;
2233
+ }, "strip", z.ZodTypeAny, {
2234
+ media: {
2235
+ url: string;
2236
+ };
2237
+ description?: string | null | undefined;
2238
+ spoiler?: boolean | undefined;
2239
+ }, {
2240
+ media: {
2241
+ url: string;
2242
+ };
2243
+ description?: string | null | undefined;
2244
+ spoiler?: boolean | undefined;
2245
+ }>;
2246
+ declare const mediaGalleryPredicate: z.ZodObject<{
2247
+ items: z.ZodArray<z.ZodObject<{
2248
+ media: z.ZodObject<{
2249
+ url: z.ZodEffects<z.ZodString, string, string>;
2250
+ }, "strip", z.ZodTypeAny, {
2251
+ url: string;
2252
+ }, {
2253
+ url: string;
2254
+ }>;
2255
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2256
+ spoiler: z.ZodOptional<z.ZodBoolean>;
2257
+ }, "strip", z.ZodTypeAny, {
2258
+ media: {
2259
+ url: string;
2260
+ };
2261
+ description?: string | null | undefined;
2262
+ spoiler?: boolean | undefined;
2263
+ }, {
2264
+ media: {
2265
+ url: string;
2266
+ };
2267
+ description?: string | null | undefined;
2268
+ spoiler?: boolean | undefined;
2269
+ }>, "many">;
2270
+ }, "strip", z.ZodTypeAny, {
2271
+ items: {
2272
+ media: {
2273
+ url: string;
2274
+ };
2275
+ description?: string | null | undefined;
2276
+ spoiler?: boolean | undefined;
2277
+ }[];
2278
+ }, {
2279
+ items: {
2280
+ media: {
2281
+ url: string;
2282
+ };
2283
+ description?: string | null | undefined;
2284
+ spoiler?: boolean | undefined;
2285
+ }[];
2286
+ }>;
2287
+ declare const sectionPredicate: z.ZodObject<{
2288
+ components: z.ZodArray<z.ZodObject<{
2289
+ content: z.ZodString;
2290
+ }, "strip", z.ZodTypeAny, {
2291
+ content: string;
2292
+ }, {
2293
+ content: string;
2294
+ }>, "many">;
2295
+ accessory: z.ZodUnion<[z.ZodObject<{
2296
+ type: z.ZodLiteral<ComponentType.Button>;
2297
+ }, "strip", z.ZodTypeAny, {
2298
+ type: ComponentType.Button;
2299
+ }, {
2300
+ type: ComponentType.Button;
2301
+ }>, z.ZodObject<{
2302
+ type: z.ZodLiteral<ComponentType.Thumbnail>;
2303
+ }, "strip", z.ZodTypeAny, {
2304
+ type: ComponentType.Thumbnail;
2305
+ }, {
2306
+ type: ComponentType.Thumbnail;
2307
+ }>]>;
2308
+ }, "strip", z.ZodTypeAny, {
2309
+ components: {
2310
+ content: string;
2311
+ }[];
2312
+ accessory: {
2313
+ type: ComponentType.Button;
2314
+ } | {
2315
+ type: ComponentType.Thumbnail;
2316
+ };
2317
+ }, {
2318
+ components: {
2319
+ content: string;
2320
+ }[];
2321
+ accessory: {
2322
+ type: ComponentType.Button;
2323
+ } | {
2324
+ type: ComponentType.Thumbnail;
2325
+ };
2326
+ }>;
2327
+ declare const containerPredicate: z.ZodObject<{
2328
+ components: z.ZodArray<z.ZodUnion<[z.ZodObject<{
2329
+ type: z.ZodLiteral<ComponentType.ActionRow>;
2330
+ components: z.ZodUnion<[z.ZodArray<z.ZodObject<{
2331
+ type: z.ZodLiteral<ComponentType.Button>;
2332
+ }, "strip", z.ZodTypeAny, {
2333
+ type: ComponentType.Button;
2334
+ }, {
2335
+ type: ComponentType.Button;
2336
+ }>, "many">, z.ZodArray<z.ZodObject<{
2337
+ type: z.ZodUnion<[z.ZodLiteral<ComponentType.ChannelSelect>, z.ZodLiteral<ComponentType.MentionableSelect>, z.ZodLiteral<ComponentType.RoleSelect>, z.ZodLiteral<ComponentType.StringSelect>, z.ZodLiteral<ComponentType.UserSelect>, z.ZodLiteral<ComponentType.TextInput>]>;
2338
+ }, "strip", z.ZodTypeAny, {
2339
+ type: ComponentType.StringSelect | ComponentType.TextInput | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
2340
+ }, {
2341
+ type: ComponentType.StringSelect | ComponentType.TextInput | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
2342
+ }>, "many">]>;
2343
+ }, "strip", z.ZodTypeAny, {
2344
+ type: ComponentType.ActionRow;
2345
+ components: {
2346
+ type: ComponentType.Button;
2347
+ }[] | {
2348
+ type: ComponentType.StringSelect | ComponentType.TextInput | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
2349
+ }[];
2350
+ }, {
2351
+ type: ComponentType.ActionRow;
2352
+ components: {
2353
+ type: ComponentType.Button;
2354
+ }[] | {
2355
+ type: ComponentType.StringSelect | ComponentType.TextInput | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
2356
+ }[];
2357
+ }>, z.ZodObject<{
2358
+ file: z.ZodObject<{
2359
+ url: z.ZodEffects<z.ZodString, string, string>;
2360
+ }, "strip", z.ZodTypeAny, {
2361
+ url: string;
2362
+ }, {
2363
+ url: string;
2364
+ }>;
2365
+ spoiler: z.ZodOptional<z.ZodBoolean>;
2366
+ }, "strip", z.ZodTypeAny, {
2367
+ file: {
2368
+ url: string;
2369
+ };
2370
+ spoiler?: boolean | undefined;
2371
+ }, {
2372
+ file: {
2373
+ url: string;
2374
+ };
2375
+ spoiler?: boolean | undefined;
2376
+ }>, z.ZodObject<{
2377
+ items: z.ZodArray<z.ZodObject<{
2378
+ media: z.ZodObject<{
2379
+ url: z.ZodEffects<z.ZodString, string, string>;
2380
+ }, "strip", z.ZodTypeAny, {
2381
+ url: string;
2382
+ }, {
2383
+ url: string;
2384
+ }>;
2385
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2386
+ spoiler: z.ZodOptional<z.ZodBoolean>;
2387
+ }, "strip", z.ZodTypeAny, {
2388
+ media: {
2389
+ url: string;
2390
+ };
2391
+ description?: string | null | undefined;
2392
+ spoiler?: boolean | undefined;
2393
+ }, {
2394
+ media: {
2395
+ url: string;
2396
+ };
2397
+ description?: string | null | undefined;
2398
+ spoiler?: boolean | undefined;
2399
+ }>, "many">;
2400
+ }, "strip", z.ZodTypeAny, {
2401
+ items: {
2402
+ media: {
2403
+ url: string;
2404
+ };
2405
+ description?: string | null | undefined;
2406
+ spoiler?: boolean | undefined;
2407
+ }[];
2408
+ }, {
2409
+ items: {
2410
+ media: {
2411
+ url: string;
2412
+ };
2413
+ description?: string | null | undefined;
2414
+ spoiler?: boolean | undefined;
2415
+ }[];
2416
+ }>, z.ZodObject<{
2417
+ components: z.ZodArray<z.ZodObject<{
2418
+ content: z.ZodString;
2419
+ }, "strip", z.ZodTypeAny, {
2420
+ content: string;
2421
+ }, {
2422
+ content: string;
2423
+ }>, "many">;
2424
+ accessory: z.ZodUnion<[z.ZodObject<{
2425
+ type: z.ZodLiteral<ComponentType.Button>;
2426
+ }, "strip", z.ZodTypeAny, {
2427
+ type: ComponentType.Button;
2428
+ }, {
2429
+ type: ComponentType.Button;
2430
+ }>, z.ZodObject<{
2431
+ type: z.ZodLiteral<ComponentType.Thumbnail>;
2432
+ }, "strip", z.ZodTypeAny, {
2433
+ type: ComponentType.Thumbnail;
2434
+ }, {
2435
+ type: ComponentType.Thumbnail;
2436
+ }>]>;
2437
+ }, "strip", z.ZodTypeAny, {
2438
+ components: {
2439
+ content: string;
2440
+ }[];
2441
+ accessory: {
2442
+ type: ComponentType.Button;
2443
+ } | {
2444
+ type: ComponentType.Thumbnail;
2445
+ };
2446
+ }, {
2447
+ components: {
2448
+ content: string;
2449
+ }[];
2450
+ accessory: {
2451
+ type: ComponentType.Button;
2452
+ } | {
2453
+ type: ComponentType.Thumbnail;
2454
+ };
2455
+ }>, z.ZodObject<{
2456
+ divider: z.ZodOptional<z.ZodBoolean>;
2457
+ spacing: z.ZodOptional<z.ZodNativeEnum<typeof SeparatorSpacingSize>>;
2458
+ }, "strip", z.ZodTypeAny, {
2459
+ divider?: boolean | undefined;
2460
+ spacing?: SeparatorSpacingSize | undefined;
2461
+ }, {
2462
+ divider?: boolean | undefined;
2463
+ spacing?: SeparatorSpacingSize | undefined;
2464
+ }>, z.ZodObject<{
2465
+ content: z.ZodString;
2466
+ }, "strip", z.ZodTypeAny, {
2467
+ content: string;
2468
+ }, {
2469
+ content: string;
2470
+ }>]>, "many">;
2471
+ spoiler: z.ZodOptional<z.ZodBoolean>;
2472
+ accent_color: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2473
+ }, "strip", z.ZodTypeAny, {
2474
+ components: ({
2475
+ type: ComponentType.ActionRow;
2476
+ components: {
2477
+ type: ComponentType.Button;
2478
+ }[] | {
2479
+ type: ComponentType.StringSelect | ComponentType.TextInput | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
2480
+ }[];
2481
+ } | {
2482
+ file: {
2483
+ url: string;
2484
+ };
2485
+ spoiler?: boolean | undefined;
2486
+ } | {
2487
+ divider?: boolean | undefined;
2488
+ spacing?: SeparatorSpacingSize | undefined;
2489
+ } | {
2490
+ content: string;
2491
+ } | {
2492
+ items: {
2493
+ media: {
2494
+ url: string;
2495
+ };
2496
+ description?: string | null | undefined;
2497
+ spoiler?: boolean | undefined;
2498
+ }[];
2499
+ } | {
2500
+ components: {
2501
+ content: string;
2502
+ }[];
2503
+ accessory: {
2504
+ type: ComponentType.Button;
2505
+ } | {
2506
+ type: ComponentType.Thumbnail;
2507
+ };
2508
+ })[];
2509
+ spoiler?: boolean | undefined;
2510
+ accent_color?: number | null | undefined;
2511
+ }, {
2512
+ components: ({
2513
+ type: ComponentType.ActionRow;
2514
+ components: {
2515
+ type: ComponentType.Button;
2516
+ }[] | {
2517
+ type: ComponentType.StringSelect | ComponentType.TextInput | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
2518
+ }[];
2519
+ } | {
2520
+ file: {
2521
+ url: string;
2522
+ };
2523
+ spoiler?: boolean | undefined;
2524
+ } | {
2525
+ divider?: boolean | undefined;
2526
+ spacing?: SeparatorSpacingSize | undefined;
2527
+ } | {
2528
+ content: string;
2529
+ } | {
2530
+ items: {
2531
+ media: {
2532
+ url: string;
2533
+ };
2534
+ description?: string | null | undefined;
2535
+ spoiler?: boolean | undefined;
2536
+ }[];
2537
+ } | {
2538
+ components: {
2539
+ content: string;
2540
+ }[];
2541
+ accessory: {
2542
+ type: ComponentType.Button;
2543
+ } | {
2544
+ type: ComponentType.Thumbnail;
2545
+ };
2546
+ })[];
2547
+ spoiler?: boolean | undefined;
2548
+ accent_color?: number | null | undefined;
2549
+ }>;
2550
+
1608
2551
  interface ApplicationCommandNumericOptionMinMaxValueData extends Pick<APIApplicationCommandIntegerOption, 'max_value' | 'min_value'> {
1609
2552
  }
1610
2553
  /**
@@ -7536,13 +8479,13 @@ declare class ModalBuilder implements JSONEncodable<APIModalInteractionResponseC
7536
8479
  *
7537
8480
  * @param components - The components to add
7538
8481
  */
7539
- addActionRows(...components: RestOrArray<ActionRowBuilder | APIActionRowComponent<APIModalActionRowComponent> | ((builder: ActionRowBuilder) => ActionRowBuilder)>): this;
8482
+ addActionRows(...components: RestOrArray<ActionRowBuilder | APIActionRowComponent<APIComponentInModalActionRow> | ((builder: ActionRowBuilder) => ActionRowBuilder)>): this;
7540
8483
  /**
7541
8484
  * Sets the action rows for this modal.
7542
8485
  *
7543
8486
  * @param components - The components to set
7544
8487
  */
7545
- setActionRows(...components: RestOrArray<ActionRowBuilder | APIActionRowComponent<APIModalActionRowComponent> | ((builder: ActionRowBuilder) => ActionRowBuilder)>): this;
8488
+ setActionRows(...components: RestOrArray<ActionRowBuilder | APIActionRowComponent<APIComponentInModalActionRow> | ((builder: ActionRowBuilder) => ActionRowBuilder)>): this;
7546
8489
  /**
7547
8490
  * Removes, replaces, or inserts action rows for this modal.
7548
8491
  *
@@ -7572,7 +8515,7 @@ declare class ModalBuilder implements JSONEncodable<APIModalInteractionResponseC
7572
8515
  * @param deleteCount - The number of action rows to remove
7573
8516
  * @param rows - The replacing action row objects
7574
8517
  */
7575
- spliceActionRows(index: number, deleteCount: number, ...rows: (ActionRowBuilder | APIActionRowComponent<APIModalActionRowComponent> | ((builder: ActionRowBuilder) => ActionRowBuilder))[]): this;
8518
+ spliceActionRows(index: number, deleteCount: number, ...rows: (ActionRowBuilder | APIActionRowComponent<APIComponentInModalActionRow> | ((builder: ActionRowBuilder) => ActionRowBuilder))[]): this;
7576
8519
  /**
7577
8520
  * Serializes this builder to API-compatible JSON data.
7578
8521
  *
@@ -7836,7 +8779,7 @@ declare const embedPredicate: z.ZodEffects<z.ZodEffects<z.ZodObject<{
7836
8779
  /**
7837
8780
  * A builder that creates API-compatible JSON data for the embed author.
7838
8781
  */
7839
- declare class EmbedAuthorBuilder {
8782
+ declare class EmbedAuthorBuilder implements JSONEncodable<APIEmbedAuthor> {
7840
8783
  private readonly data;
7841
8784
  /**
7842
8785
  * Creates a new embed author from API data.
@@ -7883,7 +8826,7 @@ declare class EmbedAuthorBuilder {
7883
8826
  /**
7884
8827
  * A builder that creates API-compatible JSON data for embed fields.
7885
8828
  */
7886
- declare class EmbedFieldBuilder {
8829
+ declare class EmbedFieldBuilder implements JSONEncodable<APIEmbedField> {
7887
8830
  private readonly data;
7888
8831
  /**
7889
8832
  * Creates a new embed field from API data.
@@ -7922,7 +8865,7 @@ declare class EmbedFieldBuilder {
7922
8865
  /**
7923
8866
  * A builder that creates API-compatible JSON data for the embed footer.
7924
8867
  */
7925
- declare class EmbedFooterBuilder {
8868
+ declare class EmbedFooterBuilder implements JSONEncodable<APIEmbedFooter> {
7926
8869
  private readonly data;
7927
8870
  /**
7928
8871
  * Creates a new embed footer from API data.
@@ -8421,11 +9364,11 @@ declare class PollAnswerMediaBuilder extends PollMediaBuilder {
8421
9364
  interface PollAnswerData extends Omit<APIPollAnswer, 'answer_id' | 'poll_media'> {
8422
9365
  poll_media: PollAnswerMediaBuilder;
8423
9366
  }
8424
- declare class PollAnswerBuilder {
9367
+ declare class PollAnswerBuilder implements JSONEncodable<Omit<APIPollAnswer, 'answer_id'>> {
8425
9368
  /**
8426
9369
  * The API data associated with this poll answer.
8427
9370
  */
8428
- protected readonly data: PollAnswerData;
9371
+ private readonly data;
8429
9372
  /**
8430
9373
  * Creates a new poll answer from API data.
8431
9374
  *
@@ -8776,10 +9719,69 @@ declare const messageReferencePredicate: z.ZodObject<{
8776
9719
  channel_id?: string | undefined;
8777
9720
  fail_if_not_exists?: boolean | undefined;
8778
9721
  }>;
8779
- declare const messagePredicate: z.ZodEffects<z.ZodObject<{
8780
- content: z.ZodOptional<z.ZodString>;
9722
+ declare const messagePredicate: z.ZodUnion<[z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
8781
9723
  nonce: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
8782
9724
  tts: z.ZodOptional<z.ZodBoolean>;
9725
+ allowed_mentions: z.ZodOptional<z.ZodObject<{
9726
+ parse: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AllowedMentionsTypes>, "many">>;
9727
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9728
+ users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9729
+ replied_user: z.ZodOptional<z.ZodBoolean>;
9730
+ }, "strip", z.ZodTypeAny, {
9731
+ parse?: AllowedMentionsTypes[] | undefined;
9732
+ roles?: string[] | undefined;
9733
+ users?: string[] | undefined;
9734
+ replied_user?: boolean | undefined;
9735
+ }, {
9736
+ parse?: AllowedMentionsTypes[] | undefined;
9737
+ roles?: string[] | undefined;
9738
+ users?: string[] | undefined;
9739
+ replied_user?: boolean | undefined;
9740
+ }>>;
9741
+ message_reference: z.ZodOptional<z.ZodObject<{
9742
+ channel_id: z.ZodOptional<z.ZodString>;
9743
+ fail_if_not_exists: z.ZodOptional<z.ZodBoolean>;
9744
+ guild_id: z.ZodOptional<z.ZodString>;
9745
+ message_id: z.ZodString;
9746
+ type: z.ZodOptional<z.ZodNativeEnum<typeof MessageReferenceType>>;
9747
+ }, "strip", z.ZodTypeAny, {
9748
+ message_id: string;
9749
+ type?: MessageReferenceType | undefined;
9750
+ guild_id?: string | undefined;
9751
+ channel_id?: string | undefined;
9752
+ fail_if_not_exists?: boolean | undefined;
9753
+ }, {
9754
+ message_id: string;
9755
+ type?: MessageReferenceType | undefined;
9756
+ guild_id?: string | undefined;
9757
+ channel_id?: string | undefined;
9758
+ fail_if_not_exists?: boolean | undefined;
9759
+ }>>;
9760
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
9761
+ id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
9762
+ description: z.ZodOptional<z.ZodString>;
9763
+ duration_secs: z.ZodOptional<z.ZodNumber>;
9764
+ filename: z.ZodOptional<z.ZodString>;
9765
+ title: z.ZodOptional<z.ZodString>;
9766
+ waveform: z.ZodOptional<z.ZodString>;
9767
+ }, "strip", z.ZodTypeAny, {
9768
+ id: string | number;
9769
+ description?: string | undefined;
9770
+ title?: string | undefined;
9771
+ duration_secs?: number | undefined;
9772
+ filename?: string | undefined;
9773
+ waveform?: string | undefined;
9774
+ }, {
9775
+ id: string | number;
9776
+ description?: string | undefined;
9777
+ title?: string | undefined;
9778
+ duration_secs?: number | undefined;
9779
+ filename?: string | undefined;
9780
+ waveform?: string | undefined;
9781
+ }>, "many">>;
9782
+ enforce_nonce: z.ZodOptional<z.ZodBoolean>;
9783
+ }, {
9784
+ content: z.ZodOptional<z.ZodString>;
8783
9785
  embeds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
8784
9786
  title: z.ZodOptional<z.ZodString>;
8785
9787
  description: z.ZodOptional<z.ZodString>;
@@ -8993,86 +9995,7 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
8993
9995
  inline?: boolean | undefined;
8994
9996
  }[] | undefined;
8995
9997
  }>, "many">>;
8996
- allowed_mentions: z.ZodOptional<z.ZodObject<{
8997
- parse: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AllowedMentionsTypes>, "many">>;
8998
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
8999
- users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9000
- replied_user: z.ZodOptional<z.ZodBoolean>;
9001
- }, "strip", z.ZodTypeAny, {
9002
- parse?: AllowedMentionsTypes[] | undefined;
9003
- roles?: string[] | undefined;
9004
- users?: string[] | undefined;
9005
- replied_user?: boolean | undefined;
9006
- }, {
9007
- parse?: AllowedMentionsTypes[] | undefined;
9008
- roles?: string[] | undefined;
9009
- users?: string[] | undefined;
9010
- replied_user?: boolean | undefined;
9011
- }>>;
9012
- message_reference: z.ZodOptional<z.ZodObject<{
9013
- channel_id: z.ZodOptional<z.ZodString>;
9014
- fail_if_not_exists: z.ZodOptional<z.ZodBoolean>;
9015
- guild_id: z.ZodOptional<z.ZodString>;
9016
- message_id: z.ZodString;
9017
- type: z.ZodOptional<z.ZodNativeEnum<typeof MessageReferenceType>>;
9018
- }, "strip", z.ZodTypeAny, {
9019
- message_id: string;
9020
- type?: MessageReferenceType | undefined;
9021
- guild_id?: string | undefined;
9022
- channel_id?: string | undefined;
9023
- fail_if_not_exists?: boolean | undefined;
9024
- }, {
9025
- message_id: string;
9026
- type?: MessageReferenceType | undefined;
9027
- guild_id?: string | undefined;
9028
- channel_id?: string | undefined;
9029
- fail_if_not_exists?: boolean | undefined;
9030
- }>>;
9031
- components: z.ZodOptional<z.ZodArray<z.ZodObject<{
9032
- type: z.ZodLiteral<ComponentType.ActionRow>;
9033
- components: z.ZodArray<z.ZodObject<{
9034
- type: z.ZodUnion<[z.ZodLiteral<ComponentType.Button>, z.ZodLiteral<ComponentType.ChannelSelect>, z.ZodLiteral<ComponentType.MentionableSelect>, z.ZodLiteral<ComponentType.RoleSelect>, z.ZodLiteral<ComponentType.StringSelect>, z.ZodLiteral<ComponentType.UserSelect>]>;
9035
- }, "strip", z.ZodTypeAny, {
9036
- type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
9037
- }, {
9038
- type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
9039
- }>, "many">;
9040
- }, "strip", z.ZodTypeAny, {
9041
- type: ComponentType.ActionRow;
9042
- components: {
9043
- type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
9044
- }[];
9045
- }, {
9046
- type: ComponentType.ActionRow;
9047
- components: {
9048
- type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
9049
- }[];
9050
- }>, "many">>;
9051
9998
  sticker_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9052
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
9053
- id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
9054
- description: z.ZodOptional<z.ZodString>;
9055
- duration_secs: z.ZodOptional<z.ZodNumber>;
9056
- filename: z.ZodOptional<z.ZodString>;
9057
- title: z.ZodOptional<z.ZodString>;
9058
- waveform: z.ZodOptional<z.ZodString>;
9059
- }, "strip", z.ZodTypeAny, {
9060
- id: string | number;
9061
- description?: string | undefined;
9062
- title?: string | undefined;
9063
- duration_secs?: number | undefined;
9064
- filename?: string | undefined;
9065
- waveform?: string | undefined;
9066
- }, {
9067
- id: string | number;
9068
- description?: string | undefined;
9069
- title?: string | undefined;
9070
- duration_secs?: number | undefined;
9071
- filename?: string | undefined;
9072
- waveform?: string | undefined;
9073
- }>, "many">>;
9074
- flags: z.ZodOptional<z.ZodNumber>;
9075
- enforce_nonce: z.ZodOptional<z.ZodBoolean>;
9076
9999
  poll: z.ZodOptional<z.ZodObject<{
9077
10000
  question: z.ZodObject<{
9078
10001
  text: z.ZodString;
@@ -9177,7 +10100,28 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9177
10100
  allow_multiselect?: boolean | undefined;
9178
10101
  layout_type?: discord_api_types_v10.PollLayoutType | undefined;
9179
10102
  }>>;
9180
- }, "strip", z.ZodTypeAny, {
10103
+ components: z.ZodOptional<z.ZodArray<z.ZodObject<{
10104
+ type: z.ZodLiteral<ComponentType.ActionRow>;
10105
+ components: z.ZodArray<z.ZodObject<{
10106
+ type: z.ZodUnion<[z.ZodLiteral<ComponentType.Button>, z.ZodLiteral<ComponentType.ChannelSelect>, z.ZodLiteral<ComponentType.MentionableSelect>, z.ZodLiteral<ComponentType.RoleSelect>, z.ZodLiteral<ComponentType.StringSelect>, z.ZodLiteral<ComponentType.UserSelect>]>;
10107
+ }, "strip", z.ZodTypeAny, {
10108
+ type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
10109
+ }, {
10110
+ type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
10111
+ }>, "many">;
10112
+ }, "strip", z.ZodTypeAny, {
10113
+ type: ComponentType.ActionRow;
10114
+ components: {
10115
+ type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
10116
+ }[];
10117
+ }, {
10118
+ type: ComponentType.ActionRow;
10119
+ components: {
10120
+ type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
10121
+ }[];
10122
+ }>, "many">>;
10123
+ flags: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, number | undefined>;
10124
+ }>, "strip", z.ZodTypeAny, {
9181
10125
  components?: {
9182
10126
  type: ComponentType.ActionRow;
9183
10127
  components: {
@@ -9187,6 +10131,28 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9187
10131
  content?: string | undefined;
9188
10132
  nonce?: string | number | undefined;
9189
10133
  tts?: boolean | undefined;
10134
+ allowed_mentions?: {
10135
+ parse?: AllowedMentionsTypes[] | undefined;
10136
+ roles?: string[] | undefined;
10137
+ users?: string[] | undefined;
10138
+ replied_user?: boolean | undefined;
10139
+ } | undefined;
10140
+ message_reference?: {
10141
+ message_id: string;
10142
+ type?: MessageReferenceType | undefined;
10143
+ guild_id?: string | undefined;
10144
+ channel_id?: string | undefined;
10145
+ fail_if_not_exists?: boolean | undefined;
10146
+ } | undefined;
10147
+ attachments?: {
10148
+ id: string | number;
10149
+ description?: string | undefined;
10150
+ title?: string | undefined;
10151
+ duration_secs?: number | undefined;
10152
+ filename?: string | undefined;
10153
+ waveform?: string | undefined;
10154
+ }[] | undefined;
10155
+ enforce_nonce?: boolean | undefined;
9190
10156
  embeds?: {
9191
10157
  url?: string | undefined;
9192
10158
  description?: string | undefined;
@@ -9214,30 +10180,7 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9214
10180
  inline?: boolean | undefined;
9215
10181
  }[] | undefined;
9216
10182
  }[] | undefined;
9217
- allowed_mentions?: {
9218
- parse?: AllowedMentionsTypes[] | undefined;
9219
- roles?: string[] | undefined;
9220
- users?: string[] | undefined;
9221
- replied_user?: boolean | undefined;
9222
- } | undefined;
9223
- message_reference?: {
9224
- message_id: string;
9225
- type?: MessageReferenceType | undefined;
9226
- guild_id?: string | undefined;
9227
- channel_id?: string | undefined;
9228
- fail_if_not_exists?: boolean | undefined;
9229
- } | undefined;
9230
10183
  sticker_ids?: string[] | undefined;
9231
- attachments?: {
9232
- id: string | number;
9233
- description?: string | undefined;
9234
- title?: string | undefined;
9235
- duration_secs?: number | undefined;
9236
- filename?: string | undefined;
9237
- waveform?: string | undefined;
9238
- }[] | undefined;
9239
- flags?: number | undefined;
9240
- enforce_nonce?: boolean | undefined;
9241
10184
  poll?: {
9242
10185
  question: {
9243
10186
  text: string;
@@ -9256,6 +10199,7 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9256
10199
  allow_multiselect?: boolean | undefined;
9257
10200
  layout_type?: discord_api_types_v10.PollLayoutType | undefined;
9258
10201
  } | undefined;
10202
+ flags?: number | undefined;
9259
10203
  }, {
9260
10204
  components?: {
9261
10205
  type: ComponentType.ActionRow;
@@ -9266,6 +10210,28 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9266
10210
  content?: string | undefined;
9267
10211
  nonce?: string | number | undefined;
9268
10212
  tts?: boolean | undefined;
10213
+ allowed_mentions?: {
10214
+ parse?: AllowedMentionsTypes[] | undefined;
10215
+ roles?: string[] | undefined;
10216
+ users?: string[] | undefined;
10217
+ replied_user?: boolean | undefined;
10218
+ } | undefined;
10219
+ message_reference?: {
10220
+ message_id: string;
10221
+ type?: MessageReferenceType | undefined;
10222
+ guild_id?: string | undefined;
10223
+ channel_id?: string | undefined;
10224
+ fail_if_not_exists?: boolean | undefined;
10225
+ } | undefined;
10226
+ attachments?: {
10227
+ id: string | number;
10228
+ description?: string | undefined;
10229
+ title?: string | undefined;
10230
+ duration_secs?: number | undefined;
10231
+ filename?: string | undefined;
10232
+ waveform?: string | undefined;
10233
+ }[] | undefined;
10234
+ enforce_nonce?: boolean | undefined;
9269
10235
  embeds?: {
9270
10236
  url?: string | undefined;
9271
10237
  description?: string | undefined;
@@ -9289,34 +10255,11 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9289
10255
  } | undefined;
9290
10256
  fields?: {
9291
10257
  value: string;
9292
- name: string;
9293
- inline?: boolean | undefined;
9294
- }[] | undefined;
9295
- }[] | undefined;
9296
- allowed_mentions?: {
9297
- parse?: AllowedMentionsTypes[] | undefined;
9298
- roles?: string[] | undefined;
9299
- users?: string[] | undefined;
9300
- replied_user?: boolean | undefined;
9301
- } | undefined;
9302
- message_reference?: {
9303
- message_id: string;
9304
- type?: MessageReferenceType | undefined;
9305
- guild_id?: string | undefined;
9306
- channel_id?: string | undefined;
9307
- fail_if_not_exists?: boolean | undefined;
9308
- } | undefined;
9309
- sticker_ids?: string[] | undefined;
9310
- attachments?: {
9311
- id: string | number;
9312
- description?: string | undefined;
9313
- title?: string | undefined;
9314
- duration_secs?: number | undefined;
9315
- filename?: string | undefined;
9316
- waveform?: string | undefined;
10258
+ name: string;
10259
+ inline?: boolean | undefined;
10260
+ }[] | undefined;
9317
10261
  }[] | undefined;
9318
- flags?: number | undefined;
9319
- enforce_nonce?: boolean | undefined;
10262
+ sticker_ids?: string[] | undefined;
9320
10263
  poll?: {
9321
10264
  question: {
9322
10265
  text: string;
@@ -9335,6 +10278,7 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9335
10278
  allow_multiselect?: boolean | undefined;
9336
10279
  layout_type?: discord_api_types_v10.PollLayoutType | undefined;
9337
10280
  } | undefined;
10281
+ flags?: number | undefined;
9338
10282
  }>, {
9339
10283
  components?: {
9340
10284
  type: ComponentType.ActionRow;
@@ -9345,6 +10289,28 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9345
10289
  content?: string | undefined;
9346
10290
  nonce?: string | number | undefined;
9347
10291
  tts?: boolean | undefined;
10292
+ allowed_mentions?: {
10293
+ parse?: AllowedMentionsTypes[] | undefined;
10294
+ roles?: string[] | undefined;
10295
+ users?: string[] | undefined;
10296
+ replied_user?: boolean | undefined;
10297
+ } | undefined;
10298
+ message_reference?: {
10299
+ message_id: string;
10300
+ type?: MessageReferenceType | undefined;
10301
+ guild_id?: string | undefined;
10302
+ channel_id?: string | undefined;
10303
+ fail_if_not_exists?: boolean | undefined;
10304
+ } | undefined;
10305
+ attachments?: {
10306
+ id: string | number;
10307
+ description?: string | undefined;
10308
+ title?: string | undefined;
10309
+ duration_secs?: number | undefined;
10310
+ filename?: string | undefined;
10311
+ waveform?: string | undefined;
10312
+ }[] | undefined;
10313
+ enforce_nonce?: boolean | undefined;
9348
10314
  embeds?: {
9349
10315
  url?: string | undefined;
9350
10316
  description?: string | undefined;
@@ -9372,30 +10338,7 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9372
10338
  inline?: boolean | undefined;
9373
10339
  }[] | undefined;
9374
10340
  }[] | undefined;
9375
- allowed_mentions?: {
9376
- parse?: AllowedMentionsTypes[] | undefined;
9377
- roles?: string[] | undefined;
9378
- users?: string[] | undefined;
9379
- replied_user?: boolean | undefined;
9380
- } | undefined;
9381
- message_reference?: {
9382
- message_id: string;
9383
- type?: MessageReferenceType | undefined;
9384
- guild_id?: string | undefined;
9385
- channel_id?: string | undefined;
9386
- fail_if_not_exists?: boolean | undefined;
9387
- } | undefined;
9388
10341
  sticker_ids?: string[] | undefined;
9389
- attachments?: {
9390
- id: string | number;
9391
- description?: string | undefined;
9392
- title?: string | undefined;
9393
- duration_secs?: number | undefined;
9394
- filename?: string | undefined;
9395
- waveform?: string | undefined;
9396
- }[] | undefined;
9397
- flags?: number | undefined;
9398
- enforce_nonce?: boolean | undefined;
9399
10342
  poll?: {
9400
10343
  question: {
9401
10344
  text: string;
@@ -9414,6 +10357,7 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9414
10357
  allow_multiselect?: boolean | undefined;
9415
10358
  layout_type?: discord_api_types_v10.PollLayoutType | undefined;
9416
10359
  } | undefined;
10360
+ flags?: number | undefined;
9417
10361
  }, {
9418
10362
  components?: {
9419
10363
  type: ComponentType.ActionRow;
@@ -9424,6 +10368,28 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9424
10368
  content?: string | undefined;
9425
10369
  nonce?: string | number | undefined;
9426
10370
  tts?: boolean | undefined;
10371
+ allowed_mentions?: {
10372
+ parse?: AllowedMentionsTypes[] | undefined;
10373
+ roles?: string[] | undefined;
10374
+ users?: string[] | undefined;
10375
+ replied_user?: boolean | undefined;
10376
+ } | undefined;
10377
+ message_reference?: {
10378
+ message_id: string;
10379
+ type?: MessageReferenceType | undefined;
10380
+ guild_id?: string | undefined;
10381
+ channel_id?: string | undefined;
10382
+ fail_if_not_exists?: boolean | undefined;
10383
+ } | undefined;
10384
+ attachments?: {
10385
+ id: string | number;
10386
+ description?: string | undefined;
10387
+ title?: string | undefined;
10388
+ duration_secs?: number | undefined;
10389
+ filename?: string | undefined;
10390
+ waveform?: string | undefined;
10391
+ }[] | undefined;
10392
+ enforce_nonce?: boolean | undefined;
9427
10393
  embeds?: {
9428
10394
  url?: string | undefined;
9429
10395
  description?: string | undefined;
@@ -9451,6 +10417,132 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9451
10417
  inline?: boolean | undefined;
9452
10418
  }[] | undefined;
9453
10419
  }[] | undefined;
10420
+ sticker_ids?: string[] | undefined;
10421
+ poll?: {
10422
+ question: {
10423
+ text: string;
10424
+ };
10425
+ answers: {
10426
+ poll_media: {
10427
+ text: string;
10428
+ emoji?: {
10429
+ id?: string | undefined;
10430
+ name?: string | undefined;
10431
+ animated?: boolean | undefined;
10432
+ } | undefined;
10433
+ };
10434
+ }[];
10435
+ duration?: number | undefined;
10436
+ allow_multiselect?: boolean | undefined;
10437
+ layout_type?: discord_api_types_v10.PollLayoutType | undefined;
10438
+ } | undefined;
10439
+ flags?: number | undefined;
10440
+ }>, z.ZodObject<z.objectUtil.extendShape<{
10441
+ nonce: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
10442
+ tts: z.ZodOptional<z.ZodBoolean>;
10443
+ allowed_mentions: z.ZodOptional<z.ZodObject<{
10444
+ parse: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AllowedMentionsTypes>, "many">>;
10445
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10446
+ users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10447
+ replied_user: z.ZodOptional<z.ZodBoolean>;
10448
+ }, "strip", z.ZodTypeAny, {
10449
+ parse?: AllowedMentionsTypes[] | undefined;
10450
+ roles?: string[] | undefined;
10451
+ users?: string[] | undefined;
10452
+ replied_user?: boolean | undefined;
10453
+ }, {
10454
+ parse?: AllowedMentionsTypes[] | undefined;
10455
+ roles?: string[] | undefined;
10456
+ users?: string[] | undefined;
10457
+ replied_user?: boolean | undefined;
10458
+ }>>;
10459
+ message_reference: z.ZodOptional<z.ZodObject<{
10460
+ channel_id: z.ZodOptional<z.ZodString>;
10461
+ fail_if_not_exists: z.ZodOptional<z.ZodBoolean>;
10462
+ guild_id: z.ZodOptional<z.ZodString>;
10463
+ message_id: z.ZodString;
10464
+ type: z.ZodOptional<z.ZodNativeEnum<typeof MessageReferenceType>>;
10465
+ }, "strip", z.ZodTypeAny, {
10466
+ message_id: string;
10467
+ type?: MessageReferenceType | undefined;
10468
+ guild_id?: string | undefined;
10469
+ channel_id?: string | undefined;
10470
+ fail_if_not_exists?: boolean | undefined;
10471
+ }, {
10472
+ message_id: string;
10473
+ type?: MessageReferenceType | undefined;
10474
+ guild_id?: string | undefined;
10475
+ channel_id?: string | undefined;
10476
+ fail_if_not_exists?: boolean | undefined;
10477
+ }>>;
10478
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
10479
+ id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
10480
+ description: z.ZodOptional<z.ZodString>;
10481
+ duration_secs: z.ZodOptional<z.ZodNumber>;
10482
+ filename: z.ZodOptional<z.ZodString>;
10483
+ title: z.ZodOptional<z.ZodString>;
10484
+ waveform: z.ZodOptional<z.ZodString>;
10485
+ }, "strip", z.ZodTypeAny, {
10486
+ id: string | number;
10487
+ description?: string | undefined;
10488
+ title?: string | undefined;
10489
+ duration_secs?: number | undefined;
10490
+ filename?: string | undefined;
10491
+ waveform?: string | undefined;
10492
+ }, {
10493
+ id: string | number;
10494
+ description?: string | undefined;
10495
+ title?: string | undefined;
10496
+ duration_secs?: number | undefined;
10497
+ filename?: string | undefined;
10498
+ waveform?: string | undefined;
10499
+ }>, "many">>;
10500
+ enforce_nonce: z.ZodOptional<z.ZodBoolean>;
10501
+ }, {
10502
+ components: z.ZodArray<z.ZodUnion<[z.ZodObject<{
10503
+ type: z.ZodLiteral<ComponentType.ActionRow>;
10504
+ components: z.ZodArray<z.ZodObject<{
10505
+ type: z.ZodUnion<[z.ZodLiteral<ComponentType.Button>, z.ZodLiteral<ComponentType.ChannelSelect>, z.ZodLiteral<ComponentType.MentionableSelect>, z.ZodLiteral<ComponentType.RoleSelect>, z.ZodLiteral<ComponentType.StringSelect>, z.ZodLiteral<ComponentType.UserSelect>]>;
10506
+ }, "strip", z.ZodTypeAny, {
10507
+ type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
10508
+ }, {
10509
+ type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
10510
+ }>, "many">;
10511
+ }, "strip", z.ZodTypeAny, {
10512
+ type: ComponentType.ActionRow;
10513
+ components: {
10514
+ type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
10515
+ }[];
10516
+ }, {
10517
+ type: ComponentType.ActionRow;
10518
+ components: {
10519
+ type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
10520
+ }[];
10521
+ }>, z.ZodObject<{
10522
+ type: z.ZodUnion<[z.ZodLiteral<ComponentType.Container>, z.ZodLiteral<ComponentType.File>, z.ZodLiteral<ComponentType.MediaGallery>, z.ZodLiteral<ComponentType.Section>, z.ZodLiteral<ComponentType.Separator>, z.ZodLiteral<ComponentType.TextDisplay>, z.ZodLiteral<ComponentType.Thumbnail>]>;
10523
+ }, "strip", z.ZodTypeAny, {
10524
+ type: ComponentType.Section | ComponentType.TextDisplay | ComponentType.Thumbnail | ComponentType.MediaGallery | ComponentType.File | ComponentType.Separator | ComponentType.Container;
10525
+ }, {
10526
+ type: ComponentType.Section | ComponentType.TextDisplay | ComponentType.Thumbnail | ComponentType.MediaGallery | ComponentType.File | ComponentType.Separator | ComponentType.Container;
10527
+ }>]>, "many">;
10528
+ flags: z.ZodEffects<z.ZodNumber, number, number>;
10529
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10530
+ embeds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNever, "many">>>;
10531
+ sticker_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNever, "many">>>;
10532
+ poll: z.ZodOptional<z.ZodNull>;
10533
+ }>, "strip", z.ZodTypeAny, {
10534
+ components: ({
10535
+ type: ComponentType.ActionRow;
10536
+ components: {
10537
+ type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
10538
+ }[];
10539
+ } | {
10540
+ type: ComponentType.Section | ComponentType.TextDisplay | ComponentType.Thumbnail | ComponentType.MediaGallery | ComponentType.File | ComponentType.Separator | ComponentType.Container;
10541
+ })[];
10542
+ flags: number;
10543
+ content?: string | null | undefined;
10544
+ nonce?: string | number | undefined;
10545
+ tts?: boolean | undefined;
9454
10546
  allowed_mentions?: {
9455
10547
  parse?: AllowedMentionsTypes[] | undefined;
9456
10548
  roles?: string[] | undefined;
@@ -9464,7 +10556,6 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9464
10556
  channel_id?: string | undefined;
9465
10557
  fail_if_not_exists?: boolean | undefined;
9466
10558
  } | undefined;
9467
- sticker_ids?: string[] | undefined;
9468
10559
  attachments?: {
9469
10560
  id: string | number;
9470
10561
  description?: string | undefined;
@@ -9473,27 +10564,49 @@ declare const messagePredicate: z.ZodEffects<z.ZodObject<{
9473
10564
  filename?: string | undefined;
9474
10565
  waveform?: string | undefined;
9475
10566
  }[] | undefined;
9476
- flags?: number | undefined;
9477
10567
  enforce_nonce?: boolean | undefined;
9478
- poll?: {
9479
- question: {
9480
- text: string;
9481
- };
9482
- answers: {
9483
- poll_media: {
9484
- text: string;
9485
- emoji?: {
9486
- id?: string | undefined;
9487
- name?: string | undefined;
9488
- animated?: boolean | undefined;
9489
- } | undefined;
9490
- };
10568
+ embeds?: never[] | null | undefined;
10569
+ sticker_ids?: never[] | null | undefined;
10570
+ poll?: null | undefined;
10571
+ }, {
10572
+ components: ({
10573
+ type: ComponentType.ActionRow;
10574
+ components: {
10575
+ type: ComponentType.Button | ComponentType.StringSelect | ComponentType.UserSelect | ComponentType.RoleSelect | ComponentType.MentionableSelect | ComponentType.ChannelSelect;
9491
10576
  }[];
9492
- duration?: number | undefined;
9493
- allow_multiselect?: boolean | undefined;
9494
- layout_type?: discord_api_types_v10.PollLayoutType | undefined;
10577
+ } | {
10578
+ type: ComponentType.Section | ComponentType.TextDisplay | ComponentType.Thumbnail | ComponentType.MediaGallery | ComponentType.File | ComponentType.Separator | ComponentType.Container;
10579
+ })[];
10580
+ flags: number;
10581
+ content?: string | null | undefined;
10582
+ nonce?: string | number | undefined;
10583
+ tts?: boolean | undefined;
10584
+ allowed_mentions?: {
10585
+ parse?: AllowedMentionsTypes[] | undefined;
10586
+ roles?: string[] | undefined;
10587
+ users?: string[] | undefined;
10588
+ replied_user?: boolean | undefined;
9495
10589
  } | undefined;
9496
- }>;
10590
+ message_reference?: {
10591
+ message_id: string;
10592
+ type?: MessageReferenceType | undefined;
10593
+ guild_id?: string | undefined;
10594
+ channel_id?: string | undefined;
10595
+ fail_if_not_exists?: boolean | undefined;
10596
+ } | undefined;
10597
+ attachments?: {
10598
+ id: string | number;
10599
+ description?: string | undefined;
10600
+ title?: string | undefined;
10601
+ duration_secs?: number | undefined;
10602
+ filename?: string | undefined;
10603
+ waveform?: string | undefined;
10604
+ }[] | undefined;
10605
+ enforce_nonce?: boolean | undefined;
10606
+ embeds?: never[] | null | undefined;
10607
+ sticker_ids?: never[] | null | undefined;
10608
+ poll?: null | undefined;
10609
+ }>]>;
9497
10610
 
9498
10611
  /**
9499
10612
  * A builder that creates API-compatible JSON data for attachments.
@@ -9635,7 +10748,7 @@ declare class MessageReferenceBuilder implements JSONEncodable<MessageReferenceB
9635
10748
  interface MessageBuilderData extends Partial<Omit<RESTPostAPIChannelMessageJSONBody, 'allowed_mentions' | 'attachments' | 'components' | 'embeds' | 'message_reference' | 'poll'>> {
9636
10749
  allowed_mentions?: AllowedMentionsBuilder;
9637
10750
  attachments: AttachmentBuilder[];
9638
- components: ActionRowBuilder[];
10751
+ components: MessageTopLevelComponentBuilder[];
9639
10752
  embeds: EmbedBuilder[];
9640
10753
  message_reference?: MessageReferenceBuilder;
9641
10754
  poll?: PollBuilder;
@@ -9652,7 +10765,7 @@ declare class MessageBuilder implements JSONEncodable<RESTPostAPIChannelMessageJ
9652
10765
  /**
9653
10766
  * Gets the components of this message.
9654
10767
  */
9655
- get components(): readonly ActionRowBuilder[];
10768
+ get components(): readonly MessageTopLevelComponentBuilder[];
9656
10769
  /**
9657
10770
  * Gets the embeds of this message.
9658
10771
  */
@@ -9773,11 +10886,47 @@ declare class MessageBuilder implements JSONEncodable<RESTPostAPIChannelMessageJ
9773
10886
  */
9774
10887
  clearMessageReference(): this;
9775
10888
  /**
9776
- * Adds components to this message.
10889
+ * Adds action row components to this message.
9777
10890
  *
9778
- * @param components - The components to add
10891
+ * @param components - The action row components to add
10892
+ */
10893
+ addActionRowComponents(...components: RestOrArray<ActionRowBuilder | APIActionRowComponent<APIComponentInMessageActionRow$1> | ((builder: ActionRowBuilder) => ActionRowBuilder)>): this;
10894
+ /**
10895
+ * Adds container components to this message.
10896
+ *
10897
+ * @param components - The container components to add
10898
+ */
10899
+ addContainerComponents(...components: RestOrArray<APIContainerComponent | ContainerBuilder | ((builder: ContainerBuilder) => ContainerBuilder)>): this;
10900
+ /**
10901
+ * Adds file components to this message.
10902
+ *
10903
+ * @param components - The file components to add
9779
10904
  */
9780
- addComponents(...components: RestOrArray<ActionRowBuilder | APIActionRowComponent<APIMessageActionRowComponent> | ((builder: ActionRowBuilder) => ActionRowBuilder)>): this;
10905
+ addFileComponents(...components: RestOrArray<APIFileComponent | FileBuilder | ((builder: FileBuilder) => FileBuilder)>): this;
10906
+ /**
10907
+ * Adds media gallery components to this message.
10908
+ *
10909
+ * @param components - The media gallery components to add
10910
+ */
10911
+ addMediaGalleryComponents(...components: RestOrArray<APIMediaGalleryComponent | MediaGalleryBuilder | ((builder: MediaGalleryBuilder) => MediaGalleryBuilder)>): this;
10912
+ /**
10913
+ * Adds section components to this message.
10914
+ *
10915
+ * @param components - The section components to add
10916
+ */
10917
+ addSectionComponents(...components: RestOrArray<APISectionComponent | SectionBuilder | ((builder: SectionBuilder) => SectionBuilder)>): this;
10918
+ /**
10919
+ * Adds separator components to this message.
10920
+ *
10921
+ * @param components - The separator components to add
10922
+ */
10923
+ addSeparatorComponents(...components: RestOrArray<APISeparatorComponent | SeparatorBuilder | ((builder: SeparatorBuilder) => SeparatorBuilder)>): this;
10924
+ /**
10925
+ * Adds text display components to this message.
10926
+ *
10927
+ * @param components - The text display components to add
10928
+ */
10929
+ addTextDisplayComponents(...components: RestOrArray<APITextDisplayComponent | TextDisplayBuilder | ((builder: TextDisplayBuilder) => TextDisplayBuilder)>): this;
9781
10930
  /**
9782
10931
  * Removes, replaces, or inserts components for this message.
9783
10932
  *
@@ -9806,13 +10955,7 @@ declare class MessageBuilder implements JSONEncodable<RESTPostAPIChannelMessageJ
9806
10955
  * @param deleteCount - The amount of components to remove
9807
10956
  * @param components - The components to insert
9808
10957
  */
9809
- spliceComponents(start: number, deleteCount: number, ...components: RestOrArray<ActionRowBuilder | APIActionRowComponent<APIMessageActionRowComponent> | ((builder: ActionRowBuilder) => ActionRowBuilder)>): this;
9810
- /**
9811
- * Sets the components of this message.
9812
- *
9813
- * @param components - The components to set
9814
- */
9815
- setComponents(...components: RestOrArray<ActionRowBuilder | APIActionRowComponent<APIMessageActionRowComponent> | ((builder: ActionRowBuilder) => ActionRowBuilder)>): this;
10958
+ spliceComponents(start: number, deleteCount: number, ...components: RestOrArray<APIMessageTopLevelComponent | MessageTopLevelComponentBuilder>): this;
9816
10959
  /**
9817
10960
  * Sets the sticker ids of this message.
9818
10961
  *
@@ -10059,4 +11202,4 @@ declare const refineURLPredicate: (allowedProtocols: string[]) => (value: string
10059
11202
  */
10060
11203
  declare const version: string;
10061
11204
 
10062
- export { ActionRowBuilder, type ActionRowBuilderData, AllowedMentionsBuilder, type AnyAPIActionRowComponent, type AnyActionRowComponentBuilder, type ApplicationCommandNumericOptionMinMaxValueData, ApplicationCommandNumericOptionMinMaxValueMixin, 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, ContextMenuCommandBuilder, type ContextMenuCommandType, CustomIdButtonBuilder, type CustomIdButtonStyle, DangerButtonBuilder, EmbedAuthorBuilder, EmbedBuilder, type EmbedBuilderData, EmbedFieldBuilder, EmbedFooterBuilder, type EmojiOrLabelButtonData, EmojiOrLabelButtonMixin, LinkButtonBuilder, type MappedComponentTypes, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, MessageBuilder, type MessageBuilderData, type MessageComponentBuilder, MessageContextCommandBuilder, MessageReferenceBuilder, type MessageReferenceBuilderData, type ModalActionRowComponentBuilder, ModalBuilder, type ModalBuilderData, type ModalComponentBuilder, PollAnswerBuilder, type PollAnswerData, PollAnswerMediaBuilder, PollBuilder, type PollData, PollMediaBuilder, PollQuestionBuilder, PremiumButtonBuilder, PrimaryButtonBuilder, type RestOrArray, RoleSelectMenuBuilder, SecondaryButtonBuilder, SharedChatInputCommandOptions, type SharedChatInputCommandOptionsData, SharedChatInputCommandSubcommands, type SharedChatInputCommandSubcommandsData, SharedName, SharedNameAndDescription, type SharedNameAndDescriptionData, type SharedNameData, StringSelectMenuBuilder, type StringSelectMenuData, StringSelectMenuOptionBuilder, SuccessButtonBuilder, TextInputBuilder, UserContextCommandBuilder, UserSelectMenuBuilder, actionRowPredicate, allowedMentionPredicate, attachmentPredicate, basicOptionPredicate, buttonPredicate, channelOptionPredicate, chatInputCommandPredicate, chatInputCommandSubcommandGroupPredicate, chatInputCommandSubcommandPredicate, createComponentBuilder, customIdPredicate, disableValidators, embedAuthorPredicate, embedFieldPredicate, embedFooterPredicate, embedLength, embedPredicate, emojiPredicate, enableValidators, integerOptionPredicate, isValidationEnabled, localeMapPredicate, memberPermissionsPredicate, messageCommandPredicate, messagePredicate, messageReferencePredicate, modalPredicate, normalizeArray, numberOptionPredicate, pollAnswerMediaPredicate, pollAnswerPredicate, pollPredicate, pollQuestionPredicate, refineURLPredicate, resolveBuilder, selectMenuChannelPredicate, selectMenuMentionablePredicate, selectMenuRolePredicate, selectMenuStringOptionPredicate, selectMenuStringPredicate, selectMenuUserPredicate, stringOptionPredicate, textInputPredicate, userCommandPredicate, validate, version };
11205
+ export { ActionRowBuilder, type ActionRowBuilderData, AllowedMentionsBuilder, type AnyActionRowComponentBuilder, type ApplicationCommandNumericOptionMinMaxValueData, ApplicationCommandNumericOptionMinMaxValueMixin, 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, ContextMenuCommandBuilder, type ContextMenuCommandType, CustomIdButtonBuilder, type CustomIdButtonStyle, DangerButtonBuilder, EmbedAuthorBuilder, EmbedBuilder, type EmbedBuilderData, EmbedFieldBuilder, EmbedFooterBuilder, type EmojiOrLabelButtonData, EmojiOrLabelButtonMixin, FileBuilder, LinkButtonBuilder, type MappedComponentTypes, MediaGalleryBuilder, type MediaGalleryBuilderData, MediaGalleryItemBuilder, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, MessageBuilder, type MessageBuilderData, type MessageComponentBuilder, MessageContextCommandBuilder, MessageReferenceBuilder, type MessageReferenceBuilderData, 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, actionRowPredicate, allowedMentionPredicate, attachmentPredicate, basicOptionPredicate, buttonPredicate, channelOptionPredicate, chatInputCommandPredicate, chatInputCommandSubcommandGroupPredicate, chatInputCommandSubcommandPredicate, containerPredicate, createComponentBuilder, customIdPredicate, disableValidators, embedAuthorPredicate, embedFieldPredicate, embedFooterPredicate, embedLength, embedPredicate, emojiPredicate, enableValidators, filePredicate, integerOptionPredicate, isValidationEnabled, localeMapPredicate, mediaGalleryItemPredicate, mediaGalleryPredicate, memberPermissionsPredicate, messageCommandPredicate, messagePredicate, messageReferencePredicate, modalPredicate, normalizeArray, numberOptionPredicate, pollAnswerMediaPredicate, pollAnswerPredicate, pollPredicate, pollQuestionPredicate, refineURLPredicate, resolveAccessoryComponent, resolveBuilder, sectionPredicate, selectMenuChannelPredicate, selectMenuMentionablePredicate, selectMenuRolePredicate, selectMenuStringOptionPredicate, selectMenuStringPredicate, selectMenuUserPredicate, separatorPredicate, stringOptionPredicate, textDisplayPredicate, textInputPredicate, thumbnailPredicate, userCommandPredicate, validate, version };