Am I being rate limited?
I am editng a message in 3 different servers after 5 seconds. Sometimes it takes a long time to update something, and the bot just gives up after an hour. Is this a rate limit, or is it cause of some error in my code? I would go test it out myself by logging the rate limit errors in the listener, but I don't really want to wait an hour
7 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!An edit rate limit should not last an hour
5 seconds is too short and API may be considered spam
at least 15 minutes is recommended (I had a bot that edit a message every 5 minutes and it had to be verified. They said 5 minutes was too short and if I change it to 15 minutes the bot would be verified. I did and bot was verified)
How about using an interaction editReply? WIll the rate limit for that be more linient?
I looked at the logs and I got a rate limit for 15 mins
Don't spam the APIs then
I just printed out everything in the rateLimited event
It didn't say much but the time to wait is like 900 seconds
i went on the discord api docs and it said in seconds though
does djs translate it to ms?
Discord Developer Portal
Discord Developer Portal — API Docs for Bots and Developers
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.