[+] Get quoted message

[FIX] Properly reply to messages sent by the current user
This commit is contained in:
Pedro Lopez
2020-02-01 22:41:53 -04:00
parent ba8edc8d40
commit a6cc5e5bf2
2 changed files with 34 additions and 5 deletions

View File

@@ -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}
`);
}
});