How do I set the request timeout to a larger period of time?
I'm trying to make my bot send a file to a user -- it's an automated exe compiler for NodeJS scripts that sends the exes in .zip files.
Anyways, my internet is too trash to send the full file within the allotted times of the default request timeout.
How do I set the request timeout to go on for a bit longer?
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!
- ✅
Marked as resolved by OPDiscord is
14.13.0
& node is 20.9.0
AbortError: The user aborted a request.
A request took longer than the specified timeout (15 seconds default), and was aborted to not lock up the request handler.
- This can be caused by an internal server error on Discord's side, or just a slow connection.
- In case of a slow connection, the timeout
option in RESTOptions can be increased to prevent future AbortErrors.