diff --git a/src/fw.ts b/src/fw.ts index c16dbce..3355bd9 100644 --- a/src/fw.ts +++ b/src/fw.ts @@ -70,8 +70,14 @@ function handleSock(sock) { groupJid: null, textMessage, message: msg.message, + imageMessage: msg.message.imageMessage || null, + audioMessage: msg.message.audioMessage || null, + videoMessage: msg.message.videoMessage || null, + documentMessage: msg.message.documentMessage || null, + stickerMessage: msg.message.stickerMessage || null, msg, remoteJid: msg.key.remoteJid, + quotedMessage: msg.message?.extendedTextMessage?.contextInfo?.quotedMessage || null, } if (properties.isGroup) { diff --git a/src/interface.ts b/src/interface.ts index e0c1c3d..f91e228 100644 --- a/src/interface.ts +++ b/src/interface.ts @@ -1,4 +1,10 @@ -import {WAMessage, WASocket} from '@adiwajshing/baileys' +import {proto, WAMessage, WASocket} from '@adiwajshing/baileys' +import IMessage = proto.IMessage; +import IImageMessage = proto.Message.IImageMessage; +import IAudioMessage = proto.Message.IAudioMessage; +import IVideoMessage = proto.Message.IVideoMessage; +import IDocumentMessage = proto.Message.IDocumentMessage; +import IStickerMessage = proto.Message.IStickerMessage; export interface Properties { command: string, @@ -10,6 +16,12 @@ export interface Properties { textMessage?: string | null message: any, msg: WAMessage, + quotedMessage?: IMessage|null, + imageMessage: IImageMessage|null, + audioMessage: IAudioMessage|null, + videoMessage: IVideoMessage|null, + documentMessage: IDocumentMessage|null, + stickerMessage: IStickerMessage|null, [key: string]: any }