@discordjs/builders 1.14.1 → 1.15.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/README.md CHANGED
@@ -5,11 +5,12 @@
5
5
  </p>
6
6
  <br />
7
7
  <p>
8
- <a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
8
+ <a href="https://discord.gg/djs"><img src="https://img.shields.io/badge/join_us-on_discord-5865F2?logo=discord&logoColor=white" alt="Discord server" /></a>
9
9
  <a href="https://www.npmjs.com/package/@discordjs/builders"><img src="https://img.shields.io/npm/v/@discordjs/builders.svg?maxAge=3600" alt="npm version" /></a>
10
10
  <a href="https://www.npmjs.com/package/@discordjs/builders"><img src="https://img.shields.io/npm/dt/@discordjs/builders.svg?maxAge=3600" alt="npm downloads" /></a>
11
11
  <a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
12
- <a href="https://github.com/discordjs/discord.js/commits/main/packages/builders"><img alt="Last commit." src="https://img.shields.io/github/last-commit/discordjs/discord.js?logo=github&logoColor=ffffff&path=packages%2Fbuilders"></a>
12
+ <a href="https://github.com/discordjs/discord.js/commits/main/packages/builders"><img alt="Last commit." src="https://img.shields.io/github/last-commit/discordjs/discord.js?logo=github&logoColor=ffffff&path=packages%2Fbuilders" /></a>
13
+ <a href="https://opencollective.com/discordjs"><img src="https://img.shields.io/opencollective/backers/discordjs?maxAge=3600&logo=opencollective" alt="backers" /></a>
13
14
  <a href="https://codecov.io/gh/discordjs/discord.js"><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=builders" alt="Code coverage" /></a>
14
15
  </p>
15
16
  <p>
@@ -43,7 +44,7 @@ You can find examples of how to use the builders in the [Slash Command Builders]
43
44
  - [Guide][guide] ([source][guide-source])
44
45
  Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
45
46
  - [discord.js Discord server][discord]
46
- - [Discord API Discord server][discord-api]
47
+ - [Discord Developers Discord server][discord-developers]
47
48
  - [GitHub][source]
48
49
  - [npm][npm]
49
50
  - [Related libraries][related-libs]
@@ -62,12 +63,12 @@ If you don't understand something in the documentation, you are experiencing pro
62
63
  [website]: https://discord.js.org
63
64
  [website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
64
65
  [documentation]: https://discord.js.org/docs/packages/builders/stable
65
- [guide]: https://discordjs.guide/
66
- [guide-source]: https://github.com/discordjs/guide
67
- [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
66
+ [guide]: https://discordjs.guide
67
+ [guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
68
+ [guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
68
69
  [discord]: https://discord.gg/djs
69
- [discord-api]: https://discord.gg/discord-api
70
+ [discord-developers]: https://discord.gg/discord-developers
70
71
  [source]: https://github.com/discordjs/discord.js/tree/main/packages/builders
71
72
  [npm]: https://www.npmjs.com/package/@discordjs/builders
72
- [related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
73
+ [related-libs]: https://docs.discord.com/developers/developer-tools/community-resources#libraries
73
74
  [contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _sapphire_shapeshift from '@sapphire/shapeshift';
2
- import { APIEmbedField, APIEmbedAuthor, APIEmbed, APIEmbedFooter, APIEmbedImage, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIBaseComponent, ComponentType, APIActionRowComponent, APIComponentInActionRow, APIMessageComponent, APIModalComponent, APIButtonComponent, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIComponentInMessageActionRow, APIComponentInModalActionRow, APICheckboxComponent, APICheckboxGroupOption, APICheckboxGroupComponent, APIRadioGroupOption, APIRadioGroupComponent, 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, APIApplicationCommandSubcommandOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
2
+ import { APIEmbedField, APIEmbedAuthor, APIEmbed, APIEmbedFooter, APIEmbedImage, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIBaseComponent, ComponentType, APIActionRowComponent, APIComponentInActionRow, APIMessageComponent, APIModalComponent, APIButtonComponent, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIComponentInMessageActionRow, APIComponentInModalActionRow, APICheckboxComponent, APICheckboxGroupOption, APICheckboxGroupComponent, APIRadioGroupOption, APIRadioGroupComponent, APIFileUploadComponent, FileUploadType, 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, APIApplicationCommandSubcommandOption, APIApplicationCommandSubcommandGroupOption, 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
 
@@ -1379,6 +1379,7 @@ declare class FileUploadBuilder extends ComponentBuilder<APIFileUploadComponent>
1379
1379
  * custom_id: "file_upload",
1380
1380
  * min_values: 2,
1381
1381
  * max_values: 5,
1382
+ * file_types: ["image", ".pdf"],
1382
1383
  * });
1383
1384
  * ```
1384
1385
  * @example
@@ -1388,7 +1389,9 @@ declare class FileUploadBuilder extends ComponentBuilder<APIFileUploadComponent>
1388
1389
  * custom_id: "file_upload",
1389
1390
  * min_values: 2,
1390
1391
  * max_values: 5,
1391
- * }).setRequired();
1392
+ * })
1393
+ * .setFileTypes("image", ".pdf")
1394
+ * .setRequired();
1392
1395
  * ```
1393
1396
  */
1394
1397
  constructor(data?: Partial<APIFileUploadComponent>);
@@ -1418,6 +1421,28 @@ declare class FileUploadBuilder extends ComponentBuilder<APIFileUploadComponent>
1418
1421
  * Clears the maximum values.
1419
1422
  */
1420
1423
  clearMaxValues(): this;
1424
+ /**
1425
+ * Adds file types allowed in this file upload.
1426
+ *
1427
+ * @remarks
1428
+ * When specifying only extensions, include `.jpg` for image uploads and both `.mp4` and `.mov`
1429
+ * for video uploads due to mobile platform limitations.
1430
+ * @param fileTypes - The file groups or dot-prefixed extensions to allow
1431
+ */
1432
+ addFileTypes(...fileTypes: RestOrArray<FileUploadType>): this;
1433
+ /**
1434
+ * Sets the file types allowed in this file upload.
1435
+ *
1436
+ * @remarks
1437
+ * When specifying only extensions, include `.jpg` for image uploads and both `.mp4` and `.mov`
1438
+ * for video uploads due to mobile platform limitations.
1439
+ * @param fileTypes - The file groups or dot-prefixed extensions to allow
1440
+ */
1441
+ setFileTypes(...fileTypes: RestOrArray<FileUploadType>): this;
1442
+ /**
1443
+ * Clears the file types allowed in this file upload.
1444
+ */
1445
+ clearFileTypes(): this;
1421
1446
  /**
1422
1447
  * Sets whether this file upload is required.
1423
1448
  *
@@ -14149,6 +14174,7 @@ declare const fileUploadPredicate: _sapphire_shapeshift.ObjectValidator<{
14149
14174
  custom_id: string;
14150
14175
  min_values: number | undefined;
14151
14176
  max_values: number | undefined;
14177
+ file_types: [] | [string] | [string, string] | [string, string, string, string] | [string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string] | [string, string, string, string, string, string] | [string, string, string, string, string] | [string, string, string] | undefined;
14152
14178
  required: boolean | undefined;
14153
14179
  }, _sapphire_shapeshift.UndefinedToOptional<{
14154
14180
  type: ComponentType;
@@ -14156,6 +14182,7 @@ declare const fileUploadPredicate: _sapphire_shapeshift.ObjectValidator<{
14156
14182
  custom_id: string;
14157
14183
  min_values: number | undefined;
14158
14184
  max_values: number | undefined;
14185
+ file_types: [] | [string] | [string, string] | [string, string, string, string] | [string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string] | [string, string, string, string, string, string] | [string, string, string, string, string] | [string, string, string] | undefined;
14159
14186
  required: boolean | undefined;
14160
14187
  }>>;
14161
14188
 
@@ -14186,6 +14213,7 @@ declare const labelPredicate: _sapphire_shapeshift.ObjectValidator<{
14186
14213
  custom_id: /*elided*/ any;
14187
14214
  min_values: /*elided*/ any;
14188
14215
  max_values: /*elided*/ any;
14216
+ file_types: /*elided*/ any;
14189
14217
  required: /*elided*/ any;
14190
14218
  }> | _sapphire_shapeshift.UndefinedToOptional<{
14191
14219
  type: /*elided*/ any;
@@ -14240,6 +14268,7 @@ declare const labelPredicate: _sapphire_shapeshift.ObjectValidator<{
14240
14268
  custom_id: /*elided*/ any;
14241
14269
  min_values: /*elided*/ any;
14242
14270
  max_values: /*elided*/ any;
14271
+ file_types: /*elided*/ any;
14243
14272
  required: /*elided*/ any;
14244
14273
  }> | _sapphire_shapeshift.UndefinedToOptional<{
14245
14274
  type: /*elided*/ any;
@@ -15667,6 +15696,32 @@ declare class SlashCommandAttachmentOption extends ApplicationCommandOptionBase
15667
15696
  * The type of this option.
15668
15697
  */
15669
15698
  readonly type: ApplicationCommandOptionType.Attachment;
15699
+ /**
15700
+ * The file types allowed for this attachment option.
15701
+ */
15702
+ readonly file_types?: FileUploadType[];
15703
+ /**
15704
+ * Adds file types allowed for this attachment option.
15705
+ *
15706
+ * @remarks
15707
+ * When specifying only extensions, include `.jpg` for image uploads and both `.mp4` and `.mov`
15708
+ * for video uploads due to mobile platform limitations.
15709
+ * @param fileTypes - The file groups or dot-prefixed extensions to allow
15710
+ */
15711
+ addFileTypes(...fileTypes: RestOrArray<FileUploadType>): this;
15712
+ /**
15713
+ * Sets the file types allowed for this attachment option.
15714
+ *
15715
+ * @remarks
15716
+ * When specifying only extensions, include `.jpg` for image uploads and both `.mp4` and `.mov`
15717
+ * for video uploads due to mobile platform limitations.
15718
+ * @param fileTypes - The file groups or dot-prefixed extensions to allow
15719
+ */
15720
+ setFileTypes(...fileTypes: RestOrArray<FileUploadType>): this;
15721
+ /**
15722
+ * Clears the file types allowed for this attachment option.
15723
+ */
15724
+ clearFileTypes(): this;
15670
15725
  /**
15671
15726
  * {@inheritDoc ApplicationCommandOptionBase.toJSON}
15672
15727
  */
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _sapphire_shapeshift from '@sapphire/shapeshift';
2
- import { APIEmbedField, APIEmbedAuthor, APIEmbed, APIEmbedFooter, APIEmbedImage, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIBaseComponent, ComponentType, APIActionRowComponent, APIComponentInActionRow, APIMessageComponent, APIModalComponent, APIButtonComponent, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIComponentInMessageActionRow, APIComponentInModalActionRow, APICheckboxComponent, APICheckboxGroupOption, APICheckboxGroupComponent, APIRadioGroupOption, APIRadioGroupComponent, 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, APIApplicationCommandSubcommandOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
2
+ import { APIEmbedField, APIEmbedAuthor, APIEmbed, APIEmbedFooter, APIEmbedImage, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIBaseComponent, ComponentType, APIActionRowComponent, APIComponentInActionRow, APIMessageComponent, APIModalComponent, APIButtonComponent, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIComponentInMessageActionRow, APIComponentInModalActionRow, APICheckboxComponent, APICheckboxGroupOption, APICheckboxGroupComponent, APIRadioGroupOption, APIRadioGroupComponent, APIFileUploadComponent, FileUploadType, 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, APIApplicationCommandSubcommandOption, APIApplicationCommandSubcommandGroupOption, 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
 
@@ -1379,6 +1379,7 @@ declare class FileUploadBuilder extends ComponentBuilder<APIFileUploadComponent>
1379
1379
  * custom_id: "file_upload",
1380
1380
  * min_values: 2,
1381
1381
  * max_values: 5,
1382
+ * file_types: ["image", ".pdf"],
1382
1383
  * });
1383
1384
  * ```
1384
1385
  * @example
@@ -1388,7 +1389,9 @@ declare class FileUploadBuilder extends ComponentBuilder<APIFileUploadComponent>
1388
1389
  * custom_id: "file_upload",
1389
1390
  * min_values: 2,
1390
1391
  * max_values: 5,
1391
- * }).setRequired();
1392
+ * })
1393
+ * .setFileTypes("image", ".pdf")
1394
+ * .setRequired();
1392
1395
  * ```
1393
1396
  */
1394
1397
  constructor(data?: Partial<APIFileUploadComponent>);
@@ -1418,6 +1421,28 @@ declare class FileUploadBuilder extends ComponentBuilder<APIFileUploadComponent>
1418
1421
  * Clears the maximum values.
1419
1422
  */
1420
1423
  clearMaxValues(): this;
1424
+ /**
1425
+ * Adds file types allowed in this file upload.
1426
+ *
1427
+ * @remarks
1428
+ * When specifying only extensions, include `.jpg` for image uploads and both `.mp4` and `.mov`
1429
+ * for video uploads due to mobile platform limitations.
1430
+ * @param fileTypes - The file groups or dot-prefixed extensions to allow
1431
+ */
1432
+ addFileTypes(...fileTypes: RestOrArray<FileUploadType>): this;
1433
+ /**
1434
+ * Sets the file types allowed in this file upload.
1435
+ *
1436
+ * @remarks
1437
+ * When specifying only extensions, include `.jpg` for image uploads and both `.mp4` and `.mov`
1438
+ * for video uploads due to mobile platform limitations.
1439
+ * @param fileTypes - The file groups or dot-prefixed extensions to allow
1440
+ */
1441
+ setFileTypes(...fileTypes: RestOrArray<FileUploadType>): this;
1442
+ /**
1443
+ * Clears the file types allowed in this file upload.
1444
+ */
1445
+ clearFileTypes(): this;
1421
1446
  /**
1422
1447
  * Sets whether this file upload is required.
1423
1448
  *
@@ -14149,6 +14174,7 @@ declare const fileUploadPredicate: _sapphire_shapeshift.ObjectValidator<{
14149
14174
  custom_id: string;
14150
14175
  min_values: number | undefined;
14151
14176
  max_values: number | undefined;
14177
+ file_types: [] | [string] | [string, string] | [string, string, string, string] | [string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string] | [string, string, string, string, string, string] | [string, string, string, string, string] | [string, string, string] | undefined;
14152
14178
  required: boolean | undefined;
14153
14179
  }, _sapphire_shapeshift.UndefinedToOptional<{
14154
14180
  type: ComponentType;
@@ -14156,6 +14182,7 @@ declare const fileUploadPredicate: _sapphire_shapeshift.ObjectValidator<{
14156
14182
  custom_id: string;
14157
14183
  min_values: number | undefined;
14158
14184
  max_values: number | undefined;
14185
+ file_types: [] | [string] | [string, string] | [string, string, string, string] | [string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string] | [string, string, string, string, string, string] | [string, string, string, string, string] | [string, string, string] | undefined;
14159
14186
  required: boolean | undefined;
14160
14187
  }>>;
14161
14188
 
@@ -14186,6 +14213,7 @@ declare const labelPredicate: _sapphire_shapeshift.ObjectValidator<{
14186
14213
  custom_id: /*elided*/ any;
14187
14214
  min_values: /*elided*/ any;
14188
14215
  max_values: /*elided*/ any;
14216
+ file_types: /*elided*/ any;
14189
14217
  required: /*elided*/ any;
14190
14218
  }> | _sapphire_shapeshift.UndefinedToOptional<{
14191
14219
  type: /*elided*/ any;
@@ -14240,6 +14268,7 @@ declare const labelPredicate: _sapphire_shapeshift.ObjectValidator<{
14240
14268
  custom_id: /*elided*/ any;
14241
14269
  min_values: /*elided*/ any;
14242
14270
  max_values: /*elided*/ any;
14271
+ file_types: /*elided*/ any;
14243
14272
  required: /*elided*/ any;
14244
14273
  }> | _sapphire_shapeshift.UndefinedToOptional<{
14245
14274
  type: /*elided*/ any;
@@ -15667,6 +15696,32 @@ declare class SlashCommandAttachmentOption extends ApplicationCommandOptionBase
15667
15696
  * The type of this option.
15668
15697
  */
15669
15698
  readonly type: ApplicationCommandOptionType.Attachment;
15699
+ /**
15700
+ * The file types allowed for this attachment option.
15701
+ */
15702
+ readonly file_types?: FileUploadType[];
15703
+ /**
15704
+ * Adds file types allowed for this attachment option.
15705
+ *
15706
+ * @remarks
15707
+ * When specifying only extensions, include `.jpg` for image uploads and both `.mp4` and `.mov`
15708
+ * for video uploads due to mobile platform limitations.
15709
+ * @param fileTypes - The file groups or dot-prefixed extensions to allow
15710
+ */
15711
+ addFileTypes(...fileTypes: RestOrArray<FileUploadType>): this;
15712
+ /**
15713
+ * Sets the file types allowed for this attachment option.
15714
+ *
15715
+ * @remarks
15716
+ * When specifying only extensions, include `.jpg` for image uploads and both `.mp4` and `.mov`
15717
+ * for video uploads due to mobile platform limitations.
15718
+ * @param fileTypes - The file groups or dot-prefixed extensions to allow
15719
+ */
15720
+ setFileTypes(...fileTypes: RestOrArray<FileUploadType>): this;
15721
+ /**
15722
+ * Clears the file types allowed for this attachment option.
15723
+ */
15724
+ clearFileTypes(): this;
15670
15725
  /**
15671
15726
  * {@inheritDoc ApplicationCommandOptionBase.toJSON}
15672
15727
  */