How to get attachments from a message?
Hey, i'm recently having some issues with attachments. I want to get the attachment that an user uploaded and then resend in through the bot.
I have this code which used to work, but in the last months it stopped working
The log from console.log
3 Replies
- 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!Is the message contaning the attachment deleted? aka is this in the messageDelete evemt
I delete the message right after that
ChatGPT suggested me this to get the attachments
But it works only for images, not for files such as a .zip