From 46ba9c5e9aa0bc4de5eba1a561e7f4ef8050084a Mon Sep 17 00:00:00 2001 From: shirser121 <70711723+shirser121@users.noreply.github.com> Date: Mon, 13 Dec 2021 03:57:11 +0200 Subject: [PATCH] Add isGif to message._patch (#963) * Update Message.js Add isGif to the message data * add typings Co-authored-by: Rajeh Taher Co-authored-by: Pedro Lopez --- index.d.ts | 2 ++ src/structures/Message.js | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/index.d.ts b/index.d.ts index f3bbd43..2421ab3 100644 --- a/index.d.ts +++ b/index.d.ts @@ -525,6 +525,8 @@ declare namespace WAWebJS { broadcast: boolean, /** Indicates if the message was a status update */ isStatus: boolean, + /** Indicates if the message is a Gif */ + isGif: boolean, /** ID for the Chat that this message was sent to, except if the message was sent by the current user */ from: string, /** Indicates if the message was sent by the current user */ diff --git a/src/structures/Message.js b/src/structures/Message.js index 0ff7c05..9bbdae2 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -179,6 +179,12 @@ class Message extends Base { */ this.token = data.token ? data.token : undefined; + /** + * Indicates whether the message is a Gif + * @type {boolean} + */ + this.isGif = Boolean(data.isGif); + /** Title */ if (data.title) { this.title = data.title;