Discord limits how fast a bot may send requests. A normal bot rarely notices, but a loop that edits many messages or reacts in bulk can hit the limit.
What a rate limit looks like
Your library prints a warning such as You are being rate limited or an error with status 429 Too Many Requests. Libraries like discord.js and discord.py wait and retry by themselves. A few warnings are normal. A constant stream means your code sends too much.
How to stay inside the limits
- Do work once. Cache results instead of asking Discord every time someone runs a command.
- Do not loop over many members or channels and call the API for each one. Use bulk actions where they exist, such as bulk delete.
- Slow down messages, edits and reactions in loops with a short wait between them.
- Defer long commands. Reply to a slash command within three seconds, then follow up: Common Discord bot errors.
- Avoid global rate limits by not running several copies of the same bot with the same token.





