#๐ Python Discord Bot, WARNING discord.http We are being rate limited.]
21 messages ยท Page 1 of 1 (latest)
@brave grove
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
2024-05-15 21:44:35 WARNING discord.http We are being rate limited. POST https://discord.com/api/v10/guilds/1239649086701965463/roles responded with 429. Retrying in 451.06 seconds.
The bot's code can be seen here:
https://pastebin.com/bzzVfHPL
I've noticed that the !delete command works well, however the error gets throw out when the !setup command is being run
I won't be surprised if the ratelimit for creating roles is just very low, in which case there's nothing you can do of it
Do you know what the limit is? is it daily? hourly?
Another frustration I have is I cant tell if my bot is broken due to the limit or if the code is dodgy.
Im unable to troubleshoot it
That's reported in the error response: https://discord.com/developers/docs/topics/rate-limits#header-format
Is ratelimit based on my bot or the server its in? if you were to run the code would it work?
There are global limits too but generally it's per-route, so in this case would probably be for that server only:
As an example, if you exceeded a rate limit when calling one endpoint /channels/1234, you could still call another similar endpoint like /channels/9876 without a problem.
I see, im going to test it on a new server ones second
What I'd do is put a breakpoint here: https://github.com/Rapptz/discord.py/blob/9d979d3df1ada4a9b745894ed6ba3b587cb1b307/discord/http.py#L719
and examine response to see what the discord api says the ratelimit was.
discord/http.py line 719
fmt = 'We are being rate limited. %s %s responded with 429. Retrying in %.2f seconds.'```
quite lengthy wait times
creating a new test server did resolve this for me, no doubt it will be back
thanks
!close
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.