feat: send Media HD (#3535)
* Changing the quality of media downloads * return function result * add option sendImageAsHd * change example * fix quotes * chore: remove unused code --------- Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
parent
c142c3bf93
commit
0ffb66fdb1
1 changed files with 25 additions and 9 deletions
|
|
@ -470,6 +470,12 @@ client.on('message', async msg => {
|
|||
console.log(statuses);
|
||||
const chat = await statuses[0]?.getChat(); // Get user chat of a first status
|
||||
console.log(chat);
|
||||
} else if (msg.body === '!sendMediaHD' && msg.hasQuotedMsg) {
|
||||
const quotedMsg = await msg.getQuotedMessage();
|
||||
if (quotedMsg.hasMedia) {
|
||||
const media = await quotedMsg.downloadMedia();
|
||||
await client.sendMessage(msg.from, media, { sendMediaAsHd: true });
|
||||
}
|
||||
} else if (msg.body === '!parseVCard') {
|
||||
const vCard =
|
||||
'BEGIN:VCARD\n' +
|
||||
|
|
|
|||
Loading…
Reference in a new issue