From d317ca1053734d6fed651e1e8600750e4d8d16d4 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Sat, 25 Oct 2025 23:57:39 +0100 Subject: [PATCH] types(FileUploadModalData): Correct fields (#11209) * types(FileUploadModalData): update fields * docs(FileUploadModalData): `Snowflake` * types(FileUploadModalData): `Snowflake` * docs: add more --- .../src/structures/ModalSubmitInteraction.js | 12 ++++++------ packages/discord.js/typings/index.d.ts | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/discord.js/src/structures/ModalSubmitInteraction.js b/packages/discord.js/src/structures/ModalSubmitInteraction.js index 0c7d5ac7a..696ddbbc8 100644 --- a/packages/discord.js/src/structures/ModalSubmitInteraction.js +++ b/packages/discord.js/src/structures/ModalSubmitInteraction.js @@ -20,8 +20,8 @@ const getAttachment = lazy(() => require('./Attachment')); /** * @typedef {BaseModalData} FileUploadModalData * @property {string} customId The custom id of the file upload - * @property {string[]} values The values of the file upload - * @property {Collection} [attachments] The resolved attachments + * @property {Snowflake[]} values The values of the file upload + * @property {Collection} [attachments] The resolved attachments */ /** @@ -34,10 +34,10 @@ const getAttachment = lazy(() => require('./Attachment')); * @typedef {BaseModalData} SelectMenuModalData * @property {string} customId The custom id of the field * @property {string[]} values The values of the field - * @property {Collection} [members] The resolved members - * @property {Collection} [users] The resolved users - * @property {Collection} [roles] The resolved roles - * @property {Collection} [channels] The resolved channels + * @property {Collection} [members] The resolved members + * @property {Collection} [users] The resolved users + * @property {Collection} [roles] The resolved roles + * @property {Collection} [channels] The resolved channels */ /** diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index d6faee4e9..e8483d008 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -2826,7 +2826,8 @@ export interface SelectMenuModalData export interface FileUploadModalData extends BaseModalData { customId: string; - files: readonly Attachment[]; + values: readonly Snowflake[]; + attachments: ReadonlyCollection; } export type ModalData = FileUploadModalData | SelectMenuModalData | TextInputModalData;