I can send a png from a javascript buffer as a message attachment, but I cannot embed it.

My code looks like this:

makeMemeAsync('geordieDrake', before, after).then(buffer => {
    initialQuery.channel.send({
        content: 'Your meme sir', 
        files: [ 
            {
                attachment: buffer, name: 'geordieDrake.svg'
            }
        ]
    });
});


makeMemeAsync() returns Promise<Buffer> a node buffer. This code works. It create a message with an attachment. I download the attachment and it is a png. I want to make the image displayed in the message instead of having to be downloaded. I am a little confused on how to make that happen.
Was this page helpful?