- 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!
#DM user using rest and include file attachment in the embed
24 messages · Page 1 of 1 (latest)
i dont think thats how you add thumbnails
I think your attachment name needs to be description rather the filename however I am not 100% sure on that
No nvm
Idk tbh
Best thing to do is to log what goes in there
You also don’t add a content type which I’m also not sure if that makes a difference
`Using Attachments within Embeds
You can upload attachments when creating a message and use those attachments within your embed. To do this, you will want to upload files as part of your multipart/form-data body. Make sure that you're uploading files which contain a filename, as you will need to reference it in your payload.`
You didn’t add any headers
This is rest, not djs
body: {},
headers: { “Content-Type: “…” }
Yh that’s not how that works
It’s just “Content-Type”: “multi form/…”
Without the boundary stuff
Yes
I think
Well, ok. Is the body and the files put correctly?
body: { stuff }
You’ll want body: body then
I imagine
Can you log what you put in there please
And updated code will be nice
I’ll need to look when I’m home