Attached image sending before embed? Not within

Why is this happening?
11 Replies
d.js toolkit
d.js toolkit2y 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
BankerOP2y ago
But other times, this happens:
Banker
BankerOP2y 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
Danial2y ago
Show your code!
urretf
urretf2y 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
Looped2y 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
urretf2y 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
Looped2y 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
BankerOP17mo ago
This seems to have fixed it, what exactly is filename sanitization?
urretf
urretf17mo 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