#why isnt the image like inlined in the embed?

1 messages · Page 1 of 1 (latest)

timber holly
#

how do you expect it to look like?

neat horizon
#

Ik why

#

@south jackal set this as "attachment://something"

south jackal
south jackal
neat horizon
#
const attachment = new attach(something, 'attachment://hello.png')
const embed = new embed()
.setImage('attachment://hello.png')
message.reply({ embeds: [embed], files: [attachment] })
#

that would work

timber holly
#

^

#

also, i think you can't just inline the image literally anywhere you want, if this is what you wanted

south jackal
#

alright

#

tho it worked like this on a different bot ```js
const attachment = new MessageAttachment(canvas.toBuffer(), 'welcome-image.png');

const embed = new Discord.MessageEmbed()
.setAuthor(`Welcome to the server, ${member.displayName}`, `https://cdn.discordapp.com/icons/809479699663290380/030d1709205bb369c8162bdcddfaeba8.png?size=4096`)
//....
.setDescription(`Please read the [#809479700497694741](/guild/222078108977594368/channel/809479700497694741/) and [#812757696834568204](/guild/222078108977594368/channel/812757696834568204/) yourself! Have a great time in our server!`)
.setImage(`attachment://${attachment.name}`)

channel.send({
    content: `${member}`,
    embeds: [embed],
    files: [attachment]
});``` @neat horizon
neat horizon
#

@south jackal do this

const rankcard = new Discord.MessageAttachment(buffer, `attachment://card.png`);

                const embed = new Discord.MessageEmbed()
                .setTitle(`Leaderboard position for ${member.user.username}`)
                //....
                .setImage(`attachment://card.png`)

                interaction.editReply({
                    embeds: [embed],
                    files: [rankcard]
                });
south jackal
#

ill just experiment around a bit more

#

@neat horizon found the issue, ' isnt allowed in a filename

#

and i used ${member.user.username}'s-rankcard.png as name