diff --git a/packages/discord.js/src/managers/MessageManager.js b/packages/discord.js/src/managers/MessageManager.js index 6fb95eb66ac5..d428324e2a07 100644 --- a/packages/discord.js/src/managers/MessageManager.js +++ b/packages/discord.js/src/managers/MessageManager.js @@ -152,11 +152,17 @@ class MessageManager extends CachedManager { * @returns {?Snowflake} */ + /** + * Data used to reference an attachment. + * @typedef {Object} MessageEditAttachmentData + * @property {Snowflake} id The id of the attachment + */ + /** * Options that can be passed to edit a message. * @typedef {BaseMessageOptions} MessageEditOptions - * @property {AttachmentPayload[]} [attachments] An array of attachments to keep, - * all attachments will be kept if omitted + * @property {Array} [attachments] An array of attachments to keep. + * All attachments will be kept if omitted * @property {MessageFlags} [flags] Which flags to set for the message * Only the {@link MessageFlags.SuppressEmbeds} flag can be modified. */ diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 08305031c2ed..04a60dfb73f2 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -6003,9 +6003,13 @@ export interface MessageCreateOptions extends BaseMessageOptions { export type GuildForumThreadMessageCreateOptions = BaseMessageOptions & Pick; +export interface MessageEditAttachmentData { + id: Snowflake; +} + export interface MessageEditOptions extends Omit { content?: string | null; - attachments?: JSONEncodable[]; + attachments?: (Attachment | MessageEditAttachmentData)[]; flags?: BitFieldResolvable, MessageFlags.SuppressEmbeds>; }