npm whatsapp-web.js 0.3.0
v0.3.0 - Download attachments (images, documents and more!)

latest releases: 1.23.1-alpha.5, 1.23.1-alpha.4, 1.23.1-alpha.3...
4 years ago

This release introduces a feature to get a message's attachments.

Messages now have a downloadMedia() function, which is a promise that will return an object in the following format:

{
    mimetype: 'image/jpeg',
    filename: '' // if it's a document, this will have the original filename of the file
    data: 'data:image/jpeg;base64,/9j/4AAQS...'
}

You can check if a message has media attached by using the hasMedia property. This works for images, videos, audio, voice notes, documents and stickers!

Don't miss a new whatsapp-web.js release

NewReleases is sending notifications on new releases.