mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +00:00
[+] Get quoted message
[FIX] Properly reply to messages sent by the current user
This commit is contained in:
10
example.js
10
example.js
@@ -98,6 +98,16 @@ client.on('message', async msg => {
|
||||
Filename: ${attachmentData.filename}
|
||||
Data (length): ${attachmentData.data.length}
|
||||
`);
|
||||
} else if(msg.body == '!quoteinfo' && msg.hasQuotedMsg) {
|
||||
const quotedMsg = await msg.getQuotedMessage();
|
||||
|
||||
quotedMsg.reply(`
|
||||
ID: ${quotedMsg.id._serialized}
|
||||
Type: ${quotedMsg.type}
|
||||
Author: ${(quotedMsg.author || quotedMsg.from)._serialized}
|
||||
Timestamp: ${quotedMsg.timestamp}
|
||||
Has Media? ${quotedMsg.hasMedia}
|
||||
`);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user