Closed Aikoo08 closed 3 years ago
Hello, to put your image into an embed you need first of all to generate the image and have it in a variable.
Then this code should work (discord.js v12)
let embed = new Discord.MessageEmbed() .setImage(`attachment://REPLACE_BY_IMAGE_NAME.png`).attachFiles([{ attachment: REPLACE_BY_IMAGE_VARIABLE, name: `REPLACE_BY_IMAGE_NAME.png`}]); message.channel.send(embed);
Make sure that both names in the setImage and attachFiles are the same or it will just not work.
Feel free to ask me if you need more help on it.
Thank you
Hello, to put your image into an embed you need first of all to generate the image and have it in a variable.
Then this code should work (discord.js v12)
Make sure that both names in the setImage and attachFiles are the same or it will just not work.
Feel free to ask me if you need more help on it.