How to get the attachment path?
Hello, I am trying to use an image in an embed but it won't show. The image is in the same folder.
How do I set the image properly?
22 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
setImage needs a url to an existing image
you'll have to upload the image somewhere first
one trick is you can upload it to another channel and then use the discord cdn url
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
MessageEmbed#attachFiles
has been removed. Files should be attached via the message option object instead:
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Will the image file be within the embed then?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Okay, thanks :)
Image doesn't show up.
Code:
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I did that but it just sends it with the embed not in it
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
const attachment = new AttachmentBuilder('./screenshot.png', 'screenshot.png');
like this?Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Thank you! Works great now :D
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
How would I use the buffer?
buffer, buffer
or
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
That's what I thought, thank you.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Thank you :)