From c5db0ff60600875534b8bd04666ec99770497870 Mon Sep 17 00:00:00 2001 From: Shubham Parihar Date: Tue, 28 Sep 2021 22:22:03 +0530 Subject: [PATCH] feat(MessageAttachment): add support for ephemeral property (#6652) Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com> --- src/structures/MessageAttachment.js | 6 ++++++ typings/index.d.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/src/structures/MessageAttachment.js b/src/structures/MessageAttachment.js index 5c046bfb6..513c136d9 100644 --- a/src/structures/MessageAttachment.js +++ b/src/structures/MessageAttachment.js @@ -103,6 +103,12 @@ class MessageAttachment { * @type {?string} */ this.contentType = data.content_type ?? null; + + /** + * Whether this attachment is ephemeral + * @type {boolean} + */ + this.ephemeral = data.ephemeral ?? false; } /** diff --git a/typings/index.d.ts b/typings/index.d.ts index 7bdbbdf53..b4004e11d 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1278,6 +1278,7 @@ export class MessageAttachment { public attachment: BufferResolvable | Stream; public contentType: string | null; + public ephemeral: boolean; public height: number | null; public id: Snowflake; public name: string | null;