Attached image sending before embed? Not within

Why is this happening?
11 Replies
d.js toolkit
d.js toolkit16mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - 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!
Banker
BankerOP16mo ago
But other times, this happens:
Banker
BankerOP16mo ago
In both cases, I am differing the response to give the code time to generate the graph then editing the response, once the data is ready.
Danial
Danial16mo ago
Show your code!
urretf
urretf16mo ago
This might have to do with discord filename sanitization I don't remember the specifics but try using the user's id instead of username in your filenames
Looped
Looped16mo ago
It is being sent as a file and within the Embed from what the code shows. In the setImage and in the files part of the reply
urretf
urretf16mo ago
It's only being sent once, when it is included in the files array in the editReply call. The setImage tells Discord to look for an attachment with that filename, but it doesn't attach the file.
Looped
Looped16mo ago
Ah its my bad, although I don't recall it always being like that from my past usage of canvas with DJS but as plastic suggested, it could be relating to the filename
Banker
BankerOP16mo ago
This seems to have fixed it, what exactly is filename sanitization?
urretf
urretf16mo ago
discord autochanging filenames after you upload them, before displaying the message to users which breaks the attachment:// link
Want results from more Discord servers?
Add your server