Rate limits: what they are and how to stop hitting them

Discord Bots Reviewed September 6, 2026 2 min read

Every request your bot makes counts against a budget. Go over it and Discord starts refusing, then delaying, then — if you keep going — banning the bot from the API for a while.

What you are seeing

  • 429 Too Many Requests in the console.
  • Messages sending late, in bursts, or out of order.
  • A command that works alone but fails when several people use it at once.
  • You are being rate limited on a bot that was fine yesterday.

Why it happens

Almost always a loop that talks to Discord once per item. Editing a message inside a for over a hundred entries, renaming channels on a timer, or sending one message per member is the shape of it. The library usually queues rather than failing, which hides the problem until the queue is minutes long.

What to do

  1. Find the loop

    Look for anything that sends, edits or fetches inside an iteration. That is nearly always the source.

  2. Batch instead

    One message with ten lines rather than ten messages. One embed edit at the end rather than one per step.

  3. Use bulk endpoints where they exist

    Bulk delete removes up to a hundred messages in one call. Fetching a member list once beats fetching each member.

  4. Never rename a channel on a short timer

    Channel and guild updates have a much stricter limit — a handful per ten minutes. Counter bots that update a channel name every minute are the classic case, and there is no way to make it work.

Sleeping in a loop is not the fix people think it is

Adding a delay makes the bot slow and still eventually limited, because the budget is per window, not per gap. Sending less is the fix; sending the same amount more slowly only moves the wall.

Let the library handle the retry

discord.js and discord.py both read the rate-limit headers and wait the right amount automatically. Writing your own retry on top usually makes it worse by adding requests during the cooldown.