#Sending local image in an embed

7 messages · Page 1 of 1 (latest)

viscid sun
#

So I never tried this before, first time here. And I don't know how, I tried google but no answers.

Tried this:

let { doc: apple } = doc;
const attachment = new Discord.AttachmentBuilder(apple.imagePath, { name: "image.jpg"})
return new Discord.EmbedBuilder()
    .setColor("DarkButNotBlack")
    .setTitle(apple.name)
    .setDescription(apple.description)
    .setURL(apple.url)
    .setImage(apple.hasImage ? `attachment://image.jpg` : null);```

Also tried to put the image path in the `setImage` parameter.
rose tartanBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

burnt sedge
#

afaik, attachment:// refers to an already attached image (or maybe not? who knows potatoghost )

viscid sun
#

Ok

viscid sun
#

I'm so dumb