#How to send the image inside the embed?
4 messages · Page 1 of 1 (latest)
- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
async function sendProfileImage(user, profile) {
const attachment = new AttachmentBuilder(profile.url, 'profile.png');
const embed = new EmbedBuilder()
.setColor('Blurple')
.setAuthor({ name: `${user.username}'s profile`, iconURL: user.displayAvatarURL({ dynamic: true }) })
.setImage('attachment://profile.png');
await profileLogger.send({
username: user.username,
avatarURL: user.displayAvatarURL({ dynamic: true }),
embeds: [embed],
files: [attachment]
});
}