@discordjs/builders 1.12.2 → 1.13.0
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 +166 -55
- package/dist/index.d.ts +166 -55
- package/dist/index.js +352 -227
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +300 -177
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _sapphire_shapeshift from '@sapphire/shapeshift';
|
|
2
|
-
import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIComponentInActionRow, APIMessageComponent, APIModalComponent, APIBaseComponent, ComponentType, APIButtonComponent, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIComponentInMessageActionRow, APIComponentInModalActionRow, APILabelComponent, APIFileComponent, APISeparatorComponent, SeparatorSpacingSize, APITextDisplayComponent, APIContainerComponent, APIMediaGalleryComponent, APISectionComponent, APIComponentInContainer, APIMediaGalleryItem, APIThumbnailComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, InteractionContextType, Permissions, ApplicationIntegrationType, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
|
|
2
|
+
import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIComponentInActionRow, APIMessageComponent, APIModalComponent, APIBaseComponent, ComponentType, APIButtonComponent, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIComponentInMessageActionRow, APIComponentInModalActionRow, APIFileUploadComponent, APILabelComponent, APIFileComponent, APISeparatorComponent, SeparatorSpacingSize, APITextDisplayComponent, APIContainerComponent, APIMediaGalleryComponent, APISectionComponent, APIComponentInContainer, APIMediaGalleryItem, APIThumbnailComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, InteractionContextType, Permissions, ApplicationIntegrationType, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
|
|
3
3
|
export * from '@discordjs/formatters';
|
|
4
4
|
import { JSONEncodable, Equatable } from '@discordjs/util';
|
|
5
5
|
|
|
@@ -52,25 +52,25 @@ declare const embedFooterPredicate: _sapphire_shapeshift.ObjectValidator<{
|
|
|
52
52
|
declare const timestampPredicate: _sapphire_shapeshift.UnionValidator<number | Date | null>;
|
|
53
53
|
declare const titlePredicate: _sapphire_shapeshift.UnionValidator<string | null>;
|
|
54
54
|
|
|
55
|
-
declare const Assertions$
|
|
56
|
-
declare const Assertions$
|
|
57
|
-
declare const Assertions$
|
|
58
|
-
declare const Assertions$
|
|
59
|
-
declare const Assertions$
|
|
60
|
-
declare const Assertions$
|
|
61
|
-
declare const Assertions$
|
|
62
|
-
declare const Assertions$
|
|
63
|
-
declare const Assertions$
|
|
64
|
-
declare const Assertions$
|
|
65
|
-
declare const Assertions$
|
|
66
|
-
declare const Assertions$
|
|
67
|
-
declare const Assertions$
|
|
68
|
-
declare const Assertions$
|
|
69
|
-
declare const Assertions$
|
|
70
|
-
declare const Assertions$
|
|
71
|
-
declare const Assertions$
|
|
72
|
-
declare namespace Assertions$
|
|
73
|
-
export { Assertions$
|
|
55
|
+
declare const Assertions$8_RGBPredicate: typeof RGBPredicate;
|
|
56
|
+
declare const Assertions$8_authorNamePredicate: typeof authorNamePredicate;
|
|
57
|
+
declare const Assertions$8_colorPredicate: typeof colorPredicate;
|
|
58
|
+
declare const Assertions$8_embedAuthorPredicate: typeof embedAuthorPredicate;
|
|
59
|
+
declare const Assertions$8_embedFieldPredicate: typeof embedFieldPredicate;
|
|
60
|
+
declare const Assertions$8_embedFieldsArrayPredicate: typeof embedFieldsArrayPredicate;
|
|
61
|
+
declare const Assertions$8_embedFooterPredicate: typeof embedFooterPredicate;
|
|
62
|
+
declare const Assertions$8_fieldInlinePredicate: typeof fieldInlinePredicate;
|
|
63
|
+
declare const Assertions$8_fieldLengthPredicate: typeof fieldLengthPredicate;
|
|
64
|
+
declare const Assertions$8_fieldNamePredicate: typeof fieldNamePredicate;
|
|
65
|
+
declare const Assertions$8_fieldValuePredicate: typeof fieldValuePredicate;
|
|
66
|
+
declare const Assertions$8_footerTextPredicate: typeof footerTextPredicate;
|
|
67
|
+
declare const Assertions$8_imageURLPredicate: typeof imageURLPredicate;
|
|
68
|
+
declare const Assertions$8_timestampPredicate: typeof timestampPredicate;
|
|
69
|
+
declare const Assertions$8_titlePredicate: typeof titlePredicate;
|
|
70
|
+
declare const Assertions$8_urlPredicate: typeof urlPredicate;
|
|
71
|
+
declare const Assertions$8_validateFieldLength: typeof validateFieldLength;
|
|
72
|
+
declare namespace Assertions$8 {
|
|
73
|
+
export { Assertions$8_RGBPredicate as RGBPredicate, Assertions$8_authorNamePredicate as authorNamePredicate, Assertions$8_colorPredicate as colorPredicate, descriptionPredicate$1 as descriptionPredicate, Assertions$8_embedAuthorPredicate as embedAuthorPredicate, Assertions$8_embedFieldPredicate as embedFieldPredicate, Assertions$8_embedFieldsArrayPredicate as embedFieldsArrayPredicate, Assertions$8_embedFooterPredicate as embedFooterPredicate, Assertions$8_fieldInlinePredicate as fieldInlinePredicate, Assertions$8_fieldLengthPredicate as fieldLengthPredicate, Assertions$8_fieldNamePredicate as fieldNamePredicate, Assertions$8_fieldValuePredicate as fieldValuePredicate, Assertions$8_footerTextPredicate as footerTextPredicate, Assertions$8_imageURLPredicate as imageURLPredicate, Assertions$8_timestampPredicate as timestampPredicate, Assertions$8_titlePredicate as titlePredicate, Assertions$8_urlPredicate as urlPredicate, Assertions$8_validateFieldLength as validateFieldLength };
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/**
|
|
@@ -393,26 +393,26 @@ declare const channelTypesValidator: _sapphire_shapeshift.ArrayValidator<Channel
|
|
|
393
393
|
declare const urlValidator: _sapphire_shapeshift.StringValidator<string>;
|
|
394
394
|
declare function validateRequiredButtonParameters(style?: ButtonStyle, label?: string, emoji?: APIMessageComponentEmoji, customId?: string, skuId?: string, url?: string): void;
|
|
395
395
|
|
|
396
|
-
declare const Assertions$
|
|
397
|
-
declare const Assertions$
|
|
398
|
-
declare const Assertions$
|
|
399
|
-
declare const Assertions$
|
|
400
|
-
declare const Assertions$
|
|
401
|
-
declare const Assertions$
|
|
402
|
-
declare const Assertions$
|
|
403
|
-
declare const Assertions$
|
|
404
|
-
declare const Assertions$
|
|
405
|
-
declare const Assertions$
|
|
406
|
-
declare const Assertions$
|
|
407
|
-
declare const Assertions$
|
|
408
|
-
declare const Assertions$
|
|
409
|
-
declare const Assertions$
|
|
410
|
-
declare const Assertions$
|
|
411
|
-
declare const Assertions$
|
|
412
|
-
declare const Assertions$
|
|
413
|
-
declare const Assertions$
|
|
414
|
-
declare namespace Assertions$
|
|
415
|
-
export { Assertions$
|
|
396
|
+
declare const Assertions$7_buttonLabelValidator: typeof buttonLabelValidator;
|
|
397
|
+
declare const Assertions$7_buttonStyleValidator: typeof buttonStyleValidator;
|
|
398
|
+
declare const Assertions$7_channelTypesValidator: typeof channelTypesValidator;
|
|
399
|
+
declare const Assertions$7_customIdValidator: typeof customIdValidator;
|
|
400
|
+
declare const Assertions$7_defaultValidator: typeof defaultValidator;
|
|
401
|
+
declare const Assertions$7_disabledValidator: typeof disabledValidator;
|
|
402
|
+
declare const Assertions$7_emojiValidator: typeof emojiValidator;
|
|
403
|
+
declare const Assertions$7_idValidator: typeof idValidator;
|
|
404
|
+
declare const Assertions$7_jsonOptionValidator: typeof jsonOptionValidator;
|
|
405
|
+
declare const Assertions$7_labelValueDescriptionValidator: typeof labelValueDescriptionValidator;
|
|
406
|
+
declare const Assertions$7_minMaxValidator: typeof minMaxValidator;
|
|
407
|
+
declare const Assertions$7_optionValidator: typeof optionValidator;
|
|
408
|
+
declare const Assertions$7_optionsLengthValidator: typeof optionsLengthValidator;
|
|
409
|
+
declare const Assertions$7_optionsValidator: typeof optionsValidator;
|
|
410
|
+
declare const Assertions$7_urlValidator: typeof urlValidator;
|
|
411
|
+
declare const Assertions$7_validateRequiredButtonParameters: typeof validateRequiredButtonParameters;
|
|
412
|
+
declare const Assertions$7_validateRequiredSelectMenuOptionParameters: typeof validateRequiredSelectMenuOptionParameters;
|
|
413
|
+
declare const Assertions$7_validateRequiredSelectMenuParameters: typeof validateRequiredSelectMenuParameters;
|
|
414
|
+
declare namespace Assertions$7 {
|
|
415
|
+
export { Assertions$7_buttonLabelValidator as buttonLabelValidator, Assertions$7_buttonStyleValidator as buttonStyleValidator, Assertions$7_channelTypesValidator as channelTypesValidator, Assertions$7_customIdValidator as customIdValidator, Assertions$7_defaultValidator as defaultValidator, Assertions$7_disabledValidator as disabledValidator, Assertions$7_emojiValidator as emojiValidator, Assertions$7_idValidator as idValidator, Assertions$7_jsonOptionValidator as jsonOptionValidator, Assertions$7_labelValueDescriptionValidator as labelValueDescriptionValidator, Assertions$7_minMaxValidator as minMaxValidator, Assertions$7_optionValidator as optionValidator, Assertions$7_optionsLengthValidator as optionsLengthValidator, Assertions$7_optionsValidator as optionsValidator, placeholderValidator$1 as placeholderValidator, Assertions$7_urlValidator as urlValidator, Assertions$7_validateRequiredButtonParameters as validateRequiredButtonParameters, Assertions$7_validateRequiredSelectMenuOptionParameters as validateRequiredSelectMenuOptionParameters, Assertions$7_validateRequiredSelectMenuParameters as validateRequiredSelectMenuParameters };
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
/**
|
|
@@ -1038,8 +1038,74 @@ declare class ActionRowBuilder<ComponentType extends AnyComponentBuilder> extend
|
|
|
1038
1038
|
toJSON(): APIActionRowComponent<ReturnType<ComponentType['toJSON']>>;
|
|
1039
1039
|
}
|
|
1040
1040
|
|
|
1041
|
+
/**
|
|
1042
|
+
* A builder that creates API-compatible JSON data for file uploads.
|
|
1043
|
+
*/
|
|
1044
|
+
declare class FileUploadBuilder extends ComponentBuilder<APIFileUploadComponent> {
|
|
1045
|
+
/**
|
|
1046
|
+
* Creates a new file upload.
|
|
1047
|
+
*
|
|
1048
|
+
* @param data - The API data to create this file upload with
|
|
1049
|
+
* @example
|
|
1050
|
+
* Creating a file upload from an API data object:
|
|
1051
|
+
* ```ts
|
|
1052
|
+
* const fileUpload = new FileUploadBuilder({
|
|
1053
|
+
* custom_id: "file_upload",
|
|
1054
|
+
* min_values: 2,
|
|
1055
|
+
* max_values: 5,
|
|
1056
|
+
* });
|
|
1057
|
+
* ```
|
|
1058
|
+
* @example
|
|
1059
|
+
* Creating a file upload using setters and API data:
|
|
1060
|
+
* ```ts
|
|
1061
|
+
* const fileUpload = new FileUploadBuilder({
|
|
1062
|
+
* custom_id: "file_upload",
|
|
1063
|
+
* min_values: 2,
|
|
1064
|
+
* max_values: 5,
|
|
1065
|
+
* }).setRequired();
|
|
1066
|
+
* ```
|
|
1067
|
+
*/
|
|
1068
|
+
constructor(data?: Partial<APIFileUploadComponent>);
|
|
1069
|
+
/**
|
|
1070
|
+
* Sets the custom id for this file upload.
|
|
1071
|
+
*
|
|
1072
|
+
* @param customId - The custom id to use
|
|
1073
|
+
*/
|
|
1074
|
+
setCustomId(customId: string): this;
|
|
1075
|
+
/**
|
|
1076
|
+
* Sets the minimum number of file uploads required.
|
|
1077
|
+
*
|
|
1078
|
+
* @param minValues - The minimum values that must be uploaded
|
|
1079
|
+
*/
|
|
1080
|
+
setMinValues(minValues: number): this;
|
|
1081
|
+
/**
|
|
1082
|
+
* Clears the minimum values.
|
|
1083
|
+
*/
|
|
1084
|
+
clearMinValues(): this;
|
|
1085
|
+
/**
|
|
1086
|
+
* Sets the maximum number of file uploads required.
|
|
1087
|
+
*
|
|
1088
|
+
* @param maxValues - The maximum values that must be uploaded
|
|
1089
|
+
*/
|
|
1090
|
+
setMaxValues(maxValues: number): this;
|
|
1091
|
+
/**
|
|
1092
|
+
* Clears the maximum values.
|
|
1093
|
+
*/
|
|
1094
|
+
clearMaxValues(): this;
|
|
1095
|
+
/**
|
|
1096
|
+
* Sets whether this file upload is required.
|
|
1097
|
+
*
|
|
1098
|
+
* @param required - Whether this file upload is required
|
|
1099
|
+
*/
|
|
1100
|
+
setRequired(required?: boolean): this;
|
|
1101
|
+
/**
|
|
1102
|
+
* {@inheritDoc ComponentBuilder.toJSON}
|
|
1103
|
+
*/
|
|
1104
|
+
toJSON(): APIFileUploadComponent;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1041
1107
|
interface LabelBuilderData extends Partial<Omit<APILabelComponent, 'component'>> {
|
|
1042
|
-
component?: ChannelSelectMenuBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | TextInputBuilder | UserSelectMenuBuilder;
|
|
1108
|
+
component?: ChannelSelectMenuBuilder | FileUploadBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | TextInputBuilder | UserSelectMenuBuilder;
|
|
1043
1109
|
}
|
|
1044
1110
|
/**
|
|
1045
1111
|
* A builder that creates API-compatible JSON data for labels.
|
|
@@ -1123,6 +1189,12 @@ declare class LabelBuilder extends ComponentBuilder<LabelBuilderData> {
|
|
|
1123
1189
|
* @param input - A function that returns a component builder or an already built builder
|
|
1124
1190
|
*/
|
|
1125
1191
|
setTextInputComponent(input: APITextInputComponent | TextInputBuilder | ((builder: TextInputBuilder) => TextInputBuilder)): this;
|
|
1192
|
+
/**
|
|
1193
|
+
* Sets a file upload component to this label.
|
|
1194
|
+
*
|
|
1195
|
+
* @param input - A function that returns a component builder or an already built builder
|
|
1196
|
+
*/
|
|
1197
|
+
setFileUploadComponent(input: APIFileUploadComponent | FileUploadBuilder | ((builder: FileUploadBuilder) => FileUploadBuilder)): this;
|
|
1126
1198
|
/**
|
|
1127
1199
|
* {@inheritDoc ComponentBuilder.toJSON}
|
|
1128
1200
|
*/
|
|
@@ -1695,6 +1767,10 @@ interface MappedComponentTypes {
|
|
|
1695
1767
|
* The label component type is associated with a {@link LabelBuilder}.
|
|
1696
1768
|
*/
|
|
1697
1769
|
[ComponentType.Label]: LabelBuilder;
|
|
1770
|
+
/**
|
|
1771
|
+
* The file upload component type is associated with a {@link FileUploadBuilder}.
|
|
1772
|
+
*/
|
|
1773
|
+
[ComponentType.FileUpload]: FileUploadBuilder;
|
|
1698
1774
|
}
|
|
1699
1775
|
/**
|
|
1700
1776
|
* Factory for creating components from API data.
|
|
@@ -1744,16 +1820,16 @@ declare const textInputPredicate: _sapphire_shapeshift.ObjectValidator<{
|
|
|
1744
1820
|
}>>;
|
|
1745
1821
|
declare function validateRequiredParameters$3(customId?: string, style?: TextInputStyle): void;
|
|
1746
1822
|
|
|
1747
|
-
declare const Assertions$
|
|
1748
|
-
declare const Assertions$
|
|
1749
|
-
declare const Assertions$
|
|
1750
|
-
declare const Assertions$
|
|
1751
|
-
declare const Assertions$
|
|
1752
|
-
declare const Assertions$
|
|
1753
|
-
declare const Assertions$
|
|
1754
|
-
declare const Assertions$
|
|
1755
|
-
declare namespace Assertions$
|
|
1756
|
-
export { Assertions$
|
|
1823
|
+
declare const Assertions$6_labelValidator: typeof labelValidator;
|
|
1824
|
+
declare const Assertions$6_maxLengthValidator: typeof maxLengthValidator;
|
|
1825
|
+
declare const Assertions$6_minLengthValidator: typeof minLengthValidator;
|
|
1826
|
+
declare const Assertions$6_placeholderValidator: typeof placeholderValidator;
|
|
1827
|
+
declare const Assertions$6_requiredValidator: typeof requiredValidator;
|
|
1828
|
+
declare const Assertions$6_textInputPredicate: typeof textInputPredicate;
|
|
1829
|
+
declare const Assertions$6_textInputStyleValidator: typeof textInputStyleValidator;
|
|
1830
|
+
declare const Assertions$6_valueValidator: typeof valueValidator;
|
|
1831
|
+
declare namespace Assertions$6 {
|
|
1832
|
+
export { Assertions$6_labelValidator as labelValidator, Assertions$6_maxLengthValidator as maxLengthValidator, Assertions$6_minLengthValidator as minLengthValidator, Assertions$6_placeholderValidator as placeholderValidator, Assertions$6_requiredValidator as requiredValidator, Assertions$6_textInputPredicate as textInputPredicate, Assertions$6_textInputStyleValidator as textInputStyleValidator, validateRequiredParameters$3 as validateRequiredParameters, Assertions$6_valueValidator as valueValidator };
|
|
1757
1833
|
}
|
|
1758
1834
|
|
|
1759
1835
|
/**
|
|
@@ -1865,10 +1941,31 @@ declare const titleValidator: _sapphire_shapeshift.StringValidator<string>;
|
|
|
1865
1941
|
declare const componentsValidator: _sapphire_shapeshift.ArrayValidator<[LabelBuilder | ActionRowBuilder<AnyComponentBuilder> | TextDisplayBuilder, ...(LabelBuilder | ActionRowBuilder<AnyComponentBuilder> | TextDisplayBuilder)[]], LabelBuilder | ActionRowBuilder<AnyComponentBuilder> | TextDisplayBuilder>;
|
|
1866
1942
|
declare function validateRequiredParameters$2(customId?: string, title?: string, components?: (ActionRowBuilder<ModalActionRowComponentBuilder> | LabelBuilder | TextDisplayBuilder)[]): void;
|
|
1867
1943
|
|
|
1868
|
-
declare const Assertions$
|
|
1869
|
-
declare const Assertions$
|
|
1944
|
+
declare const Assertions$5_componentsValidator: typeof componentsValidator;
|
|
1945
|
+
declare const Assertions$5_titleValidator: typeof titleValidator;
|
|
1946
|
+
declare namespace Assertions$5 {
|
|
1947
|
+
export { Assertions$5_componentsValidator as componentsValidator, Assertions$5_titleValidator as titleValidator, validateRequiredParameters$2 as validateRequiredParameters };
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
declare const fileUploadPredicate: _sapphire_shapeshift.ObjectValidator<{
|
|
1951
|
+
type: ComponentType;
|
|
1952
|
+
id: number | undefined;
|
|
1953
|
+
custom_id: string;
|
|
1954
|
+
min_values: number | undefined;
|
|
1955
|
+
max_values: number | undefined;
|
|
1956
|
+
required: boolean | undefined;
|
|
1957
|
+
}, _sapphire_shapeshift.UndefinedToOptional<{
|
|
1958
|
+
type: ComponentType;
|
|
1959
|
+
id: number | undefined;
|
|
1960
|
+
custom_id: string;
|
|
1961
|
+
min_values: number | undefined;
|
|
1962
|
+
max_values: number | undefined;
|
|
1963
|
+
required: boolean | undefined;
|
|
1964
|
+
}>>;
|
|
1965
|
+
|
|
1966
|
+
declare const Assertions$4_fileUploadPredicate: typeof fileUploadPredicate;
|
|
1870
1967
|
declare namespace Assertions$4 {
|
|
1871
|
-
export { Assertions$
|
|
1968
|
+
export { Assertions$4_fileUploadPredicate as fileUploadPredicate };
|
|
1872
1969
|
}
|
|
1873
1970
|
|
|
1874
1971
|
declare const labelPredicate: _sapphire_shapeshift.ObjectValidator<{
|
|
@@ -1877,6 +1974,13 @@ declare const labelPredicate: _sapphire_shapeshift.ObjectValidator<{
|
|
|
1877
1974
|
label: string;
|
|
1878
1975
|
description: string | undefined;
|
|
1879
1976
|
component: _sapphire_shapeshift.UndefinedToOptional<{
|
|
1977
|
+
type: any;
|
|
1978
|
+
id: any;
|
|
1979
|
+
custom_id: any;
|
|
1980
|
+
min_values: any;
|
|
1981
|
+
max_values: any;
|
|
1982
|
+
required: any;
|
|
1983
|
+
}> | _sapphire_shapeshift.UndefinedToOptional<{
|
|
1880
1984
|
type: any;
|
|
1881
1985
|
custom_id: any;
|
|
1882
1986
|
style: any;
|
|
@@ -1913,6 +2017,13 @@ declare const labelPredicate: _sapphire_shapeshift.ObjectValidator<{
|
|
|
1913
2017
|
label: string;
|
|
1914
2018
|
description: string | undefined;
|
|
1915
2019
|
component: _sapphire_shapeshift.UndefinedToOptional<{
|
|
2020
|
+
type: any;
|
|
2021
|
+
id: any;
|
|
2022
|
+
custom_id: any;
|
|
2023
|
+
min_values: any;
|
|
2024
|
+
max_values: any;
|
|
2025
|
+
required: any;
|
|
2026
|
+
}> | _sapphire_shapeshift.UndefinedToOptional<{
|
|
1916
2027
|
type: any;
|
|
1917
2028
|
custom_id: any;
|
|
1918
2029
|
style: any;
|
|
@@ -2869,4 +2980,4 @@ declare function isValidationEnabled(): boolean;
|
|
|
2869
2980
|
*/
|
|
2870
2981
|
declare const version: string;
|
|
2871
2982
|
|
|
2872
|
-
export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$
|
|
2983
|
+
export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$7 as ComponentAssertions, ComponentBuilder, Assertions$2 as ComponentsV2Assertions, ContainerBuilder, type ContainerComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, type ContextMenuCommandType, Assertions$8 as EmbedAssertions, type EmbedAuthorData, type EmbedAuthorOptions, EmbedBuilder, type EmbedFooterData, type EmbedFooterOptions, type EmbedImageData, FileBuilder, Assertions$4 as FileUploadAssertions, FileUploadBuilder, type IconData, Assertions$3 as LabelAssertions, LabelBuilder, type LabelBuilderData, type MappedComponentTypes, MediaGalleryBuilder, MediaGalleryItemBuilder, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, type ModalActionRowComponentBuilder, Assertions$5 as ModalAssertions, ModalBuilder, type ModalComponentBuilder, type RGBTuple, type RestOrArray, RoleSelectMenuBuilder, SectionBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SeparatorBuilder, SharedNameAndDescription, SharedSlashCommand, SharedSlashCommandOptions, SharedSlashCommandSubcommands, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, type SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, type SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, TextDisplayBuilder, Assertions$6 as TextInputAssertions, TextInputBuilder, ThumbnailBuilder, type ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, resolveBuilder, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _sapphire_shapeshift from '@sapphire/shapeshift';
|
|
2
|
-
import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIComponentInActionRow, APIMessageComponent, APIModalComponent, APIBaseComponent, ComponentType, APIButtonComponent, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIComponentInMessageActionRow, APIComponentInModalActionRow, APILabelComponent, APIFileComponent, APISeparatorComponent, SeparatorSpacingSize, APITextDisplayComponent, APIContainerComponent, APIMediaGalleryComponent, APISectionComponent, APIComponentInContainer, APIMediaGalleryItem, APIThumbnailComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, InteractionContextType, Permissions, ApplicationIntegrationType, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
|
|
2
|
+
import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIComponentInActionRow, APIMessageComponent, APIModalComponent, APIBaseComponent, ComponentType, APIButtonComponent, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIComponentInMessageActionRow, APIComponentInModalActionRow, APIFileUploadComponent, APILabelComponent, APIFileComponent, APISeparatorComponent, SeparatorSpacingSize, APITextDisplayComponent, APIContainerComponent, APIMediaGalleryComponent, APISectionComponent, APIComponentInContainer, APIMediaGalleryItem, APIThumbnailComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, InteractionContextType, Permissions, ApplicationIntegrationType, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
|
|
3
3
|
export * from '@discordjs/formatters';
|
|
4
4
|
import { JSONEncodable, Equatable } from '@discordjs/util';
|
|
5
5
|
|
|
@@ -52,25 +52,25 @@ declare const embedFooterPredicate: _sapphire_shapeshift.ObjectValidator<{
|
|
|
52
52
|
declare const timestampPredicate: _sapphire_shapeshift.UnionValidator<number | Date | null>;
|
|
53
53
|
declare const titlePredicate: _sapphire_shapeshift.UnionValidator<string | null>;
|
|
54
54
|
|
|
55
|
-
declare const Assertions$
|
|
56
|
-
declare const Assertions$
|
|
57
|
-
declare const Assertions$
|
|
58
|
-
declare const Assertions$
|
|
59
|
-
declare const Assertions$
|
|
60
|
-
declare const Assertions$
|
|
61
|
-
declare const Assertions$
|
|
62
|
-
declare const Assertions$
|
|
63
|
-
declare const Assertions$
|
|
64
|
-
declare const Assertions$
|
|
65
|
-
declare const Assertions$
|
|
66
|
-
declare const Assertions$
|
|
67
|
-
declare const Assertions$
|
|
68
|
-
declare const Assertions$
|
|
69
|
-
declare const Assertions$
|
|
70
|
-
declare const Assertions$
|
|
71
|
-
declare const Assertions$
|
|
72
|
-
declare namespace Assertions$
|
|
73
|
-
export { Assertions$
|
|
55
|
+
declare const Assertions$8_RGBPredicate: typeof RGBPredicate;
|
|
56
|
+
declare const Assertions$8_authorNamePredicate: typeof authorNamePredicate;
|
|
57
|
+
declare const Assertions$8_colorPredicate: typeof colorPredicate;
|
|
58
|
+
declare const Assertions$8_embedAuthorPredicate: typeof embedAuthorPredicate;
|
|
59
|
+
declare const Assertions$8_embedFieldPredicate: typeof embedFieldPredicate;
|
|
60
|
+
declare const Assertions$8_embedFieldsArrayPredicate: typeof embedFieldsArrayPredicate;
|
|
61
|
+
declare const Assertions$8_embedFooterPredicate: typeof embedFooterPredicate;
|
|
62
|
+
declare const Assertions$8_fieldInlinePredicate: typeof fieldInlinePredicate;
|
|
63
|
+
declare const Assertions$8_fieldLengthPredicate: typeof fieldLengthPredicate;
|
|
64
|
+
declare const Assertions$8_fieldNamePredicate: typeof fieldNamePredicate;
|
|
65
|
+
declare const Assertions$8_fieldValuePredicate: typeof fieldValuePredicate;
|
|
66
|
+
declare const Assertions$8_footerTextPredicate: typeof footerTextPredicate;
|
|
67
|
+
declare const Assertions$8_imageURLPredicate: typeof imageURLPredicate;
|
|
68
|
+
declare const Assertions$8_timestampPredicate: typeof timestampPredicate;
|
|
69
|
+
declare const Assertions$8_titlePredicate: typeof titlePredicate;
|
|
70
|
+
declare const Assertions$8_urlPredicate: typeof urlPredicate;
|
|
71
|
+
declare const Assertions$8_validateFieldLength: typeof validateFieldLength;
|
|
72
|
+
declare namespace Assertions$8 {
|
|
73
|
+
export { Assertions$8_RGBPredicate as RGBPredicate, Assertions$8_authorNamePredicate as authorNamePredicate, Assertions$8_colorPredicate as colorPredicate, descriptionPredicate$1 as descriptionPredicate, Assertions$8_embedAuthorPredicate as embedAuthorPredicate, Assertions$8_embedFieldPredicate as embedFieldPredicate, Assertions$8_embedFieldsArrayPredicate as embedFieldsArrayPredicate, Assertions$8_embedFooterPredicate as embedFooterPredicate, Assertions$8_fieldInlinePredicate as fieldInlinePredicate, Assertions$8_fieldLengthPredicate as fieldLengthPredicate, Assertions$8_fieldNamePredicate as fieldNamePredicate, Assertions$8_fieldValuePredicate as fieldValuePredicate, Assertions$8_footerTextPredicate as footerTextPredicate, Assertions$8_imageURLPredicate as imageURLPredicate, Assertions$8_timestampPredicate as timestampPredicate, Assertions$8_titlePredicate as titlePredicate, Assertions$8_urlPredicate as urlPredicate, Assertions$8_validateFieldLength as validateFieldLength };
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/**
|
|
@@ -393,26 +393,26 @@ declare const channelTypesValidator: _sapphire_shapeshift.ArrayValidator<Channel
|
|
|
393
393
|
declare const urlValidator: _sapphire_shapeshift.StringValidator<string>;
|
|
394
394
|
declare function validateRequiredButtonParameters(style?: ButtonStyle, label?: string, emoji?: APIMessageComponentEmoji, customId?: string, skuId?: string, url?: string): void;
|
|
395
395
|
|
|
396
|
-
declare const Assertions$
|
|
397
|
-
declare const Assertions$
|
|
398
|
-
declare const Assertions$
|
|
399
|
-
declare const Assertions$
|
|
400
|
-
declare const Assertions$
|
|
401
|
-
declare const Assertions$
|
|
402
|
-
declare const Assertions$
|
|
403
|
-
declare const Assertions$
|
|
404
|
-
declare const Assertions$
|
|
405
|
-
declare const Assertions$
|
|
406
|
-
declare const Assertions$
|
|
407
|
-
declare const Assertions$
|
|
408
|
-
declare const Assertions$
|
|
409
|
-
declare const Assertions$
|
|
410
|
-
declare const Assertions$
|
|
411
|
-
declare const Assertions$
|
|
412
|
-
declare const Assertions$
|
|
413
|
-
declare const Assertions$
|
|
414
|
-
declare namespace Assertions$
|
|
415
|
-
export { Assertions$
|
|
396
|
+
declare const Assertions$7_buttonLabelValidator: typeof buttonLabelValidator;
|
|
397
|
+
declare const Assertions$7_buttonStyleValidator: typeof buttonStyleValidator;
|
|
398
|
+
declare const Assertions$7_channelTypesValidator: typeof channelTypesValidator;
|
|
399
|
+
declare const Assertions$7_customIdValidator: typeof customIdValidator;
|
|
400
|
+
declare const Assertions$7_defaultValidator: typeof defaultValidator;
|
|
401
|
+
declare const Assertions$7_disabledValidator: typeof disabledValidator;
|
|
402
|
+
declare const Assertions$7_emojiValidator: typeof emojiValidator;
|
|
403
|
+
declare const Assertions$7_idValidator: typeof idValidator;
|
|
404
|
+
declare const Assertions$7_jsonOptionValidator: typeof jsonOptionValidator;
|
|
405
|
+
declare const Assertions$7_labelValueDescriptionValidator: typeof labelValueDescriptionValidator;
|
|
406
|
+
declare const Assertions$7_minMaxValidator: typeof minMaxValidator;
|
|
407
|
+
declare const Assertions$7_optionValidator: typeof optionValidator;
|
|
408
|
+
declare const Assertions$7_optionsLengthValidator: typeof optionsLengthValidator;
|
|
409
|
+
declare const Assertions$7_optionsValidator: typeof optionsValidator;
|
|
410
|
+
declare const Assertions$7_urlValidator: typeof urlValidator;
|
|
411
|
+
declare const Assertions$7_validateRequiredButtonParameters: typeof validateRequiredButtonParameters;
|
|
412
|
+
declare const Assertions$7_validateRequiredSelectMenuOptionParameters: typeof validateRequiredSelectMenuOptionParameters;
|
|
413
|
+
declare const Assertions$7_validateRequiredSelectMenuParameters: typeof validateRequiredSelectMenuParameters;
|
|
414
|
+
declare namespace Assertions$7 {
|
|
415
|
+
export { Assertions$7_buttonLabelValidator as buttonLabelValidator, Assertions$7_buttonStyleValidator as buttonStyleValidator, Assertions$7_channelTypesValidator as channelTypesValidator, Assertions$7_customIdValidator as customIdValidator, Assertions$7_defaultValidator as defaultValidator, Assertions$7_disabledValidator as disabledValidator, Assertions$7_emojiValidator as emojiValidator, Assertions$7_idValidator as idValidator, Assertions$7_jsonOptionValidator as jsonOptionValidator, Assertions$7_labelValueDescriptionValidator as labelValueDescriptionValidator, Assertions$7_minMaxValidator as minMaxValidator, Assertions$7_optionValidator as optionValidator, Assertions$7_optionsLengthValidator as optionsLengthValidator, Assertions$7_optionsValidator as optionsValidator, placeholderValidator$1 as placeholderValidator, Assertions$7_urlValidator as urlValidator, Assertions$7_validateRequiredButtonParameters as validateRequiredButtonParameters, Assertions$7_validateRequiredSelectMenuOptionParameters as validateRequiredSelectMenuOptionParameters, Assertions$7_validateRequiredSelectMenuParameters as validateRequiredSelectMenuParameters };
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
/**
|
|
@@ -1038,8 +1038,74 @@ declare class ActionRowBuilder<ComponentType extends AnyComponentBuilder> extend
|
|
|
1038
1038
|
toJSON(): APIActionRowComponent<ReturnType<ComponentType['toJSON']>>;
|
|
1039
1039
|
}
|
|
1040
1040
|
|
|
1041
|
+
/**
|
|
1042
|
+
* A builder that creates API-compatible JSON data for file uploads.
|
|
1043
|
+
*/
|
|
1044
|
+
declare class FileUploadBuilder extends ComponentBuilder<APIFileUploadComponent> {
|
|
1045
|
+
/**
|
|
1046
|
+
* Creates a new file upload.
|
|
1047
|
+
*
|
|
1048
|
+
* @param data - The API data to create this file upload with
|
|
1049
|
+
* @example
|
|
1050
|
+
* Creating a file upload from an API data object:
|
|
1051
|
+
* ```ts
|
|
1052
|
+
* const fileUpload = new FileUploadBuilder({
|
|
1053
|
+
* custom_id: "file_upload",
|
|
1054
|
+
* min_values: 2,
|
|
1055
|
+
* max_values: 5,
|
|
1056
|
+
* });
|
|
1057
|
+
* ```
|
|
1058
|
+
* @example
|
|
1059
|
+
* Creating a file upload using setters and API data:
|
|
1060
|
+
* ```ts
|
|
1061
|
+
* const fileUpload = new FileUploadBuilder({
|
|
1062
|
+
* custom_id: "file_upload",
|
|
1063
|
+
* min_values: 2,
|
|
1064
|
+
* max_values: 5,
|
|
1065
|
+
* }).setRequired();
|
|
1066
|
+
* ```
|
|
1067
|
+
*/
|
|
1068
|
+
constructor(data?: Partial<APIFileUploadComponent>);
|
|
1069
|
+
/**
|
|
1070
|
+
* Sets the custom id for this file upload.
|
|
1071
|
+
*
|
|
1072
|
+
* @param customId - The custom id to use
|
|
1073
|
+
*/
|
|
1074
|
+
setCustomId(customId: string): this;
|
|
1075
|
+
/**
|
|
1076
|
+
* Sets the minimum number of file uploads required.
|
|
1077
|
+
*
|
|
1078
|
+
* @param minValues - The minimum values that must be uploaded
|
|
1079
|
+
*/
|
|
1080
|
+
setMinValues(minValues: number): this;
|
|
1081
|
+
/**
|
|
1082
|
+
* Clears the minimum values.
|
|
1083
|
+
*/
|
|
1084
|
+
clearMinValues(): this;
|
|
1085
|
+
/**
|
|
1086
|
+
* Sets the maximum number of file uploads required.
|
|
1087
|
+
*
|
|
1088
|
+
* @param maxValues - The maximum values that must be uploaded
|
|
1089
|
+
*/
|
|
1090
|
+
setMaxValues(maxValues: number): this;
|
|
1091
|
+
/**
|
|
1092
|
+
* Clears the maximum values.
|
|
1093
|
+
*/
|
|
1094
|
+
clearMaxValues(): this;
|
|
1095
|
+
/**
|
|
1096
|
+
* Sets whether this file upload is required.
|
|
1097
|
+
*
|
|
1098
|
+
* @param required - Whether this file upload is required
|
|
1099
|
+
*/
|
|
1100
|
+
setRequired(required?: boolean): this;
|
|
1101
|
+
/**
|
|
1102
|
+
* {@inheritDoc ComponentBuilder.toJSON}
|
|
1103
|
+
*/
|
|
1104
|
+
toJSON(): APIFileUploadComponent;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1041
1107
|
interface LabelBuilderData extends Partial<Omit<APILabelComponent, 'component'>> {
|
|
1042
|
-
component?: ChannelSelectMenuBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | TextInputBuilder | UserSelectMenuBuilder;
|
|
1108
|
+
component?: ChannelSelectMenuBuilder | FileUploadBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | TextInputBuilder | UserSelectMenuBuilder;
|
|
1043
1109
|
}
|
|
1044
1110
|
/**
|
|
1045
1111
|
* A builder that creates API-compatible JSON data for labels.
|
|
@@ -1123,6 +1189,12 @@ declare class LabelBuilder extends ComponentBuilder<LabelBuilderData> {
|
|
|
1123
1189
|
* @param input - A function that returns a component builder or an already built builder
|
|
1124
1190
|
*/
|
|
1125
1191
|
setTextInputComponent(input: APITextInputComponent | TextInputBuilder | ((builder: TextInputBuilder) => TextInputBuilder)): this;
|
|
1192
|
+
/**
|
|
1193
|
+
* Sets a file upload component to this label.
|
|
1194
|
+
*
|
|
1195
|
+
* @param input - A function that returns a component builder or an already built builder
|
|
1196
|
+
*/
|
|
1197
|
+
setFileUploadComponent(input: APIFileUploadComponent | FileUploadBuilder | ((builder: FileUploadBuilder) => FileUploadBuilder)): this;
|
|
1126
1198
|
/**
|
|
1127
1199
|
* {@inheritDoc ComponentBuilder.toJSON}
|
|
1128
1200
|
*/
|
|
@@ -1695,6 +1767,10 @@ interface MappedComponentTypes {
|
|
|
1695
1767
|
* The label component type is associated with a {@link LabelBuilder}.
|
|
1696
1768
|
*/
|
|
1697
1769
|
[ComponentType.Label]: LabelBuilder;
|
|
1770
|
+
/**
|
|
1771
|
+
* The file upload component type is associated with a {@link FileUploadBuilder}.
|
|
1772
|
+
*/
|
|
1773
|
+
[ComponentType.FileUpload]: FileUploadBuilder;
|
|
1698
1774
|
}
|
|
1699
1775
|
/**
|
|
1700
1776
|
* Factory for creating components from API data.
|
|
@@ -1744,16 +1820,16 @@ declare const textInputPredicate: _sapphire_shapeshift.ObjectValidator<{
|
|
|
1744
1820
|
}>>;
|
|
1745
1821
|
declare function validateRequiredParameters$3(customId?: string, style?: TextInputStyle): void;
|
|
1746
1822
|
|
|
1747
|
-
declare const Assertions$
|
|
1748
|
-
declare const Assertions$
|
|
1749
|
-
declare const Assertions$
|
|
1750
|
-
declare const Assertions$
|
|
1751
|
-
declare const Assertions$
|
|
1752
|
-
declare const Assertions$
|
|
1753
|
-
declare const Assertions$
|
|
1754
|
-
declare const Assertions$
|
|
1755
|
-
declare namespace Assertions$
|
|
1756
|
-
export { Assertions$
|
|
1823
|
+
declare const Assertions$6_labelValidator: typeof labelValidator;
|
|
1824
|
+
declare const Assertions$6_maxLengthValidator: typeof maxLengthValidator;
|
|
1825
|
+
declare const Assertions$6_minLengthValidator: typeof minLengthValidator;
|
|
1826
|
+
declare const Assertions$6_placeholderValidator: typeof placeholderValidator;
|
|
1827
|
+
declare const Assertions$6_requiredValidator: typeof requiredValidator;
|
|
1828
|
+
declare const Assertions$6_textInputPredicate: typeof textInputPredicate;
|
|
1829
|
+
declare const Assertions$6_textInputStyleValidator: typeof textInputStyleValidator;
|
|
1830
|
+
declare const Assertions$6_valueValidator: typeof valueValidator;
|
|
1831
|
+
declare namespace Assertions$6 {
|
|
1832
|
+
export { Assertions$6_labelValidator as labelValidator, Assertions$6_maxLengthValidator as maxLengthValidator, Assertions$6_minLengthValidator as minLengthValidator, Assertions$6_placeholderValidator as placeholderValidator, Assertions$6_requiredValidator as requiredValidator, Assertions$6_textInputPredicate as textInputPredicate, Assertions$6_textInputStyleValidator as textInputStyleValidator, validateRequiredParameters$3 as validateRequiredParameters, Assertions$6_valueValidator as valueValidator };
|
|
1757
1833
|
}
|
|
1758
1834
|
|
|
1759
1835
|
/**
|
|
@@ -1865,10 +1941,31 @@ declare const titleValidator: _sapphire_shapeshift.StringValidator<string>;
|
|
|
1865
1941
|
declare const componentsValidator: _sapphire_shapeshift.ArrayValidator<[LabelBuilder | ActionRowBuilder<AnyComponentBuilder> | TextDisplayBuilder, ...(LabelBuilder | ActionRowBuilder<AnyComponentBuilder> | TextDisplayBuilder)[]], LabelBuilder | ActionRowBuilder<AnyComponentBuilder> | TextDisplayBuilder>;
|
|
1866
1942
|
declare function validateRequiredParameters$2(customId?: string, title?: string, components?: (ActionRowBuilder<ModalActionRowComponentBuilder> | LabelBuilder | TextDisplayBuilder)[]): void;
|
|
1867
1943
|
|
|
1868
|
-
declare const Assertions$
|
|
1869
|
-
declare const Assertions$
|
|
1944
|
+
declare const Assertions$5_componentsValidator: typeof componentsValidator;
|
|
1945
|
+
declare const Assertions$5_titleValidator: typeof titleValidator;
|
|
1946
|
+
declare namespace Assertions$5 {
|
|
1947
|
+
export { Assertions$5_componentsValidator as componentsValidator, Assertions$5_titleValidator as titleValidator, validateRequiredParameters$2 as validateRequiredParameters };
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
declare const fileUploadPredicate: _sapphire_shapeshift.ObjectValidator<{
|
|
1951
|
+
type: ComponentType;
|
|
1952
|
+
id: number | undefined;
|
|
1953
|
+
custom_id: string;
|
|
1954
|
+
min_values: number | undefined;
|
|
1955
|
+
max_values: number | undefined;
|
|
1956
|
+
required: boolean | undefined;
|
|
1957
|
+
}, _sapphire_shapeshift.UndefinedToOptional<{
|
|
1958
|
+
type: ComponentType;
|
|
1959
|
+
id: number | undefined;
|
|
1960
|
+
custom_id: string;
|
|
1961
|
+
min_values: number | undefined;
|
|
1962
|
+
max_values: number | undefined;
|
|
1963
|
+
required: boolean | undefined;
|
|
1964
|
+
}>>;
|
|
1965
|
+
|
|
1966
|
+
declare const Assertions$4_fileUploadPredicate: typeof fileUploadPredicate;
|
|
1870
1967
|
declare namespace Assertions$4 {
|
|
1871
|
-
export { Assertions$
|
|
1968
|
+
export { Assertions$4_fileUploadPredicate as fileUploadPredicate };
|
|
1872
1969
|
}
|
|
1873
1970
|
|
|
1874
1971
|
declare const labelPredicate: _sapphire_shapeshift.ObjectValidator<{
|
|
@@ -1877,6 +1974,13 @@ declare const labelPredicate: _sapphire_shapeshift.ObjectValidator<{
|
|
|
1877
1974
|
label: string;
|
|
1878
1975
|
description: string | undefined;
|
|
1879
1976
|
component: _sapphire_shapeshift.UndefinedToOptional<{
|
|
1977
|
+
type: any;
|
|
1978
|
+
id: any;
|
|
1979
|
+
custom_id: any;
|
|
1980
|
+
min_values: any;
|
|
1981
|
+
max_values: any;
|
|
1982
|
+
required: any;
|
|
1983
|
+
}> | _sapphire_shapeshift.UndefinedToOptional<{
|
|
1880
1984
|
type: any;
|
|
1881
1985
|
custom_id: any;
|
|
1882
1986
|
style: any;
|
|
@@ -1913,6 +2017,13 @@ declare const labelPredicate: _sapphire_shapeshift.ObjectValidator<{
|
|
|
1913
2017
|
label: string;
|
|
1914
2018
|
description: string | undefined;
|
|
1915
2019
|
component: _sapphire_shapeshift.UndefinedToOptional<{
|
|
2020
|
+
type: any;
|
|
2021
|
+
id: any;
|
|
2022
|
+
custom_id: any;
|
|
2023
|
+
min_values: any;
|
|
2024
|
+
max_values: any;
|
|
2025
|
+
required: any;
|
|
2026
|
+
}> | _sapphire_shapeshift.UndefinedToOptional<{
|
|
1916
2027
|
type: any;
|
|
1917
2028
|
custom_id: any;
|
|
1918
2029
|
style: any;
|
|
@@ -2869,4 +2980,4 @@ declare function isValidationEnabled(): boolean;
|
|
|
2869
2980
|
*/
|
|
2870
2981
|
declare const version: string;
|
|
2871
2982
|
|
|
2872
|
-
export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$
|
|
2983
|
+
export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$7 as ComponentAssertions, ComponentBuilder, Assertions$2 as ComponentsV2Assertions, ContainerBuilder, type ContainerComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, type ContextMenuCommandType, Assertions$8 as EmbedAssertions, type EmbedAuthorData, type EmbedAuthorOptions, EmbedBuilder, type EmbedFooterData, type EmbedFooterOptions, type EmbedImageData, FileBuilder, Assertions$4 as FileUploadAssertions, FileUploadBuilder, type IconData, Assertions$3 as LabelAssertions, LabelBuilder, type LabelBuilderData, type MappedComponentTypes, MediaGalleryBuilder, MediaGalleryItemBuilder, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, type ModalActionRowComponentBuilder, Assertions$5 as ModalAssertions, ModalBuilder, type ModalComponentBuilder, type RGBTuple, type RestOrArray, RoleSelectMenuBuilder, SectionBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SeparatorBuilder, SharedNameAndDescription, SharedSlashCommand, SharedSlashCommandOptions, SharedSlashCommandSubcommands, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, type SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, type SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, TextDisplayBuilder, Assertions$6 as TextInputAssertions, TextInputBuilder, ThumbnailBuilder, type ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, resolveBuilder, version };
|