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
d.js toolkit
d.js toolkit8mo 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!
monbrey
monbrey8mo ago
An edit rate limit should not last an hour
can
can8mo ago
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)
Eden
EdenOP8mo ago
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
monbrey
monbrey8mo ago
Don't spam the APIs then
Eden
EdenOP8mo ago
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?
Eden
EdenOP8mo ago
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.
Want results from more Discord servers?
Add your server