diff --git a/src/structures/MessageAttachment.js b/src/structures/MessageAttachment.js index f5fb723b2..6041e9e76 100644 --- a/src/structures/MessageAttachment.js +++ b/src/structures/MessageAttachment.js @@ -79,6 +79,12 @@ class MessageAttachment { * @type {?number} */ this.width = typeof data.width !== 'undefined' ? data.width : null; + + /** + * This media type of this attachment + * @type {?string} + */ + this.contentType = data.content_type ?? null; } /** diff --git a/typings/index.d.ts b/typings/index.d.ts index 121127bb5..cfec2e7ae 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1061,6 +1061,7 @@ declare module 'discord.js' { constructor(attachment: BufferResolvable | Stream, name?: string, data?: object); public attachment: BufferResolvable | Stream; + public contentType: string | null; public height: number | null; public id: Snowflake; public name: string | null;