#Set new image in embed without changing anything else
1 messages · Page 1 of 1 (latest)
?
The code :
const attachement = new Discord.AttachmentBuilder(await canvas.encode('png'), { name: 'profile-image.png' });
Discord.EmbedBuilder.from(interaction.message.embeds[0]).setImage('attachment://profile-image.png')
await interaction.editReply({
embeds: [interaction.message.embeds[0]],
files: [attachement],
components: interaction.message.components
})