zippy1981
zippy1981
DIAdiscord.js - Imagine an app
Created by zippy1981 on 10/8/2023 in #djs-questions
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('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.
15 replies