Rate Limited

Your bot sends too many requests to the Discord API, or too many requests that fail. It is temporarily blocked and stops responding for a few minutes, then works again.

What You See

  • The bot is online but stops answering for a few minutes, then comes back
  • Messages, reactions or role changes are delayed
  • Errors with HTTP status 429 in the console:
console
429 Too Many Requests
discord.errors.HTTPException: 429 Too Many Requests (error code: 0)

Two Kinds of Limits

On KataBump, your bot is subject to Discord's own limits and to two limits per hosting account:

LimitTriggered when...
Global rate limitMore than 250 requests per minute to the Discord API
Error rate limitMore than 25 failed requests in less than a minute

Full details and block durations: Discord Rate Limits.

Failed Requests Count Too

The error rate limit is the one that surprises people: a bot can be blocked while sending few requests, if many of them fail. Typical failing requests:

Discord errorCausePrevention
50007 Cannot send messages to this userDMing users who closed their DMsCatch the error and don't retry; avoid mass DMs
50013 Missing PermissionsActing without the right role/permissionCheck permissions before the request
10008 Unknown MessageEditing/deleting a message that no longer existsCatch the error, don't loop on it
10062 Unknown interactionReplying too lateSee Unknown Interaction

How to Fix It

  • Find the loop: a command or event that sends many requests in a row (welcome DMs to every member, bulk role updates, status changes every second...)
  • Handle errors instead of retrying blindly — a request that failed once will usually fail again
  • Use the cache: read data from guild.members.cache / guild.get_member() instead of fetching it every time
  • Use events rather than polling the API on a timer
  • Check for duplicate instances: two copies of the bot double every request

Log Rate Limits (discord.js)

discord.js waits automatically when Discord asks it to. Log these events to see which route is being limited:

index.js
client.rest.on('rateLimited', (info) => {
    console.warn(`[rate limit] ${info.method} ${info.route} — retry in ${info.timeToReset} ms`);
});
Need a Higher Limit?

If your bot legitimately needs more than 250 requests per minute, contact the team on Discord to discuss raising your threshold.

Still Stuck?

Check the error index or open a ticket on Discord.

Esc
Type to search the docs…