Handle Rate Limits

I've been trying stuff with channels name, but I've yet to find a way to handle Rate Limit errors from the API, how can I properly handle them? (discord.js 14.19.3) (node v22.16.0)
17 Replies
d.js toolkit
d.js toolkit6mo 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! - Marked as resolved by OP
Mafia
Mafia6mo ago
I believe that Discordjs handles rate limits for you
Asviix
AsviixOP6mo ago
They do, but I want to know when hitting it if that's possible
Mafia
Mafia6mo ago
I got you, one sec shit I cant find it now
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Mafia
Mafia6mo ago
that is it? <REST> event not documented?
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs6mo ago
:property: Client#rest discord.js@14.19.3 The REST manager of the client
Asviix
AsviixOP6mo ago
I've tried that before and it didn't work, but that may be due to my event handler, I'm gonna try some stuff
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Mafia
Mafia6mo ago
I know rest is on client but it is not in the <REST> docs
d.js docs
d.js docs6mo ago
:class: REST discord.js@14.19.3 Represents the class that manages handlers for endpoints :interface: RestEvents discord.js@14.19.3
Asviix
AsviixOP6mo ago
Purposefully sending to many request to change a channel name (2 for 10 minutes I think?), REST still doesn't throw that event
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Asviix
AsviixOP6mo ago
The bare minimum I've been doing :kekw: Like maybe 3/4 per 10 minutes max
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Asviix
AsviixOP6mo ago
Even when listening to that event didn't work, so I'm just gonna avoid getting API limited in the first place :shrug:

Did you find this page helpful?