Im using this: https://github.com/pedroslopez/whatsapp-web.js/pull/2620
to automatically post messages in a channel, i want to post media too.
But i can't seem to get it to work, here's my Code:
const msg = new MessageMedia({
mimetype: mime,
data: file,
filename: null,
filesize: null,
})
await client.sendMessage(channel, msg)
mime is image/jpeg
file is a base64 encoded file, encoded using python like this: base64.b64encode(file_content).decode('utf-8')
Error will be in the next message because of char limitation in Discord.