Leo.
Leo.
DIAdiscord.js - Imagine an app
Created by Leo. on 8/28/2023 in #djs-questions
How to send the image inside the embed?
I found the solution
5 replies
DIAdiscord.js - Imagine an app
Created by Leo. on 8/28/2023 in #djs-questions
How to send the image inside the embed?
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]
});
}
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]
});
}
5 replies
DIAdiscord.js - Imagine an app
Created by Leo. on 8/28/2023 in #djs-questions
How to send the image inside the embed?
5 replies