discord embed image with file discord js 1

discord embed image with file discord js

// Before v13
const embed = new Discord.MessageEmbed().setTitle('Attachments').attachFiles(['./image1.png', './image2.jpg']);
channel.send(embed);
// v13
const embed = new Discord.MessageEmbed().setTitle('Attachment').setImage('attachment://image.png');
channel.send({ embeds: , files: ['./image.png'] });

Here is what the above code is Doing:
1. Create a new MessageEmbed
2. Set the title of the embed to “Attachment”
3. Set the image of the embed to the attachment “image.png”
4. Send the embed with the attachment “image.png”

Similar Posts