Every Discord API limit, in one table
Last verified against Discord Developer Docs - Rate Limits
Discord enforces limits at four layers and a bot has to respect all of them at once. The REST layer has a global ceiling of 50 requests per second per bot plus per-route buckets whose size is only revealed in response headers. The gateway (the WebSocket that delivers events) caps how many payloads you may send per minute, how often you may identify, and how many guilds one connection can serve before sharding is mandatory. Payload limits govern what fits in a message: 2,000 characters of content, 10 embeds, 6,000 combined embed characters, 10 attachments, 10 MiB uploads by default. And resource caps bound what a server can hold: 250 roles, 500 channels, 15 webhooks per channel, 20 distinct reactions per message.
The three REST failure modes are worth separating because they demand different responses. A route bucket 429 (scope user or shared) means one endpoint's budget is spent: wait retry_after and only that bucket's traffic must pause. The global limit (50/s, scope global) means the whole bot must pause. And the invalid request limit is the one that takes you off the air entirely: 10,000 requests returning 401, 403 or 429 within 10 minutes gets the IP temporarily banned by Cloudflare in front of the API, after which every call returns Cloudflare's HTML "error 1015" page instead of JSON until the ban lapses. Bots hit that third tier by hammering the first two: an unhandled 429 retried in a tight loop, or a dead token retried overnight, manufactures invalid requests at machine speed.
Most of these numbers are documented in different places (rate limits topic, gateway topic, message resource, application commands, components reference, and the 30xxx error codes that fire when a cap is hit). This page collects them with the official source for each row. Where Discord does not publish a figure, the row says so rather than guessing; per-route bucket sizes in particular are intentionally unpublished and must be read from X-RateLimit-Limit at runtime. When a limit is exceeded the response is either HTTP 429 with retry_after or a specific error code such as 30005; the Discord error codes directory covers those.
Jump to: REST rate limits · Gateway connection limits · Messages and embeds · Files and uploads · Slash commands and context menu commands · Interaction timing · Message components · Webhooks · AutoMod rules · Server, channel, role and member limits
REST rate limits
Discord rate limits every REST request against a global per-bot budget and a per-route bucket. Bucket sizes are not published; you learn them from the X-RateLimit-* headers on each response. Buckets are keyed by route and major parameter (channel, guild or webhook ID), and X-RateLimit-Bucket lets you recognize when two routes share one. Exceeding any limit returns HTTP 429 with retry_after (seconds, float) and a global flag telling you whether only that bucket or the whole bot must pause. Invalid requests (401, 403, 429) are counted separately: 10,000 of them in 10 minutes triggers a temporary Cloudflare ban of the IP, so an unhandled 429 in a retry loop escalates itself into a full outage.
| What | Limit |
|---|---|
| Global rate limit | 50 requests per second, per bot |
| Per-route bucket size | Not published; read X-RateLimit-Limit |
| Rate limit headers | X-RateLimit-Limit, -Remaining, -Reset, -Reset-After, -Bucket, -Global, -Scope |
| 429 response body | message, retry_after (float seconds), global (bool), code (optional) |
| Invalid request limit | 10,000 invalid requests per 10 minutes |
| Emoji management routes | Limited per guild; headers do not follow normal conventions |
| Interaction callback endpoints | Not bound to the global rate limit |
Gateway connection limits
The gateway is the WebSocket over which your bot receives events and sends a small set of commands (heartbeat, identify, presence update, voice state update, request guild members). It has its own rate limit, an identify concurrency limit, a daily session start budget, and a hard cap on guilds per connection. The consequences arrive as close codes rather than 429s: exceed the send limit and the socket closes with 4008, identify without enough shards and it closes with 4011, request a privileged intent you have not enabled and it closes with 4014. A reconnect loop that ignores those codes drains the daily identify budget and locks the bot out until the window resets.
| What | Limit |
|---|---|
| Gateway send rate | 120 events per connection per 60 seconds |
| Identify concurrency | max_concurrency identifies per 5 seconds |
| Session starts | session_start_limit.total per reset_after window |
| Guilds per shard | 2,500 guilds maximum per shard |
| Shard assignment | shard_id = (guild_id >> 22) % num_shards |
| Heartbeat | Every heartbeat_interval ms from Hello (op 10) |
| large_threshold | 50 to 250 members |
| Request Guild Members user_ids | Up to 100 user IDs per request |
| Privileged intents | GUILD_MEMBERS, GUILD_PRESENCES, MESSAGE_CONTENT |
| Privileged intent review threshold | More than 10,000 unique users |
| Unverified app guild cap | 100 guilds |
Messages and embeds
These are the payload limits enforced on Create Message, Edit Message and Execute Webhook. Exceeding any of them returns HTTP 400 with error 50035 Invalid Form Body and an errors object pointing at the exact field, while sending a message with nothing in it at all fails with 50006. The 2,000-character content limit applies to bots regardless of the developer's Nitro status; Nitro's higher limit is a user-account feature. Webhook executions and interaction responses use the same limits, so one local validation layer covers all three send paths. Validate lengths before the request leaves your process: the API tells you what was wrong, but only after you have spent a request and logged an error.
| What | Limit |
|---|---|
| Message content | 2,000 characters |
| Embeds per message | 10 |
| Embed title | 256 characters |
| Embed description | 4,096 characters |
| Embed fields | 25 field objects |
| Embed field name | 256 characters |
| Embed field value | 1,024 characters |
| Embed footer text | 2,048 characters |
| Embed author name | 256 characters |
| Combined embed text | 6,000 characters across all embeds |
| Attachments per message | 10 |
| Stickers per message | 3 sticker_ids |
| Unique reactions per message | 20 distinct emoji |
| Bulk delete | 2-100 messages, none older than 14 days |
| Get Channel Messages | 1-100 per request (default 50) |
| Get Reactions | 1-100 users per request (default 25) |
| Edits to messages older than 1 hour | Limited; exact count not published |
Files and uploads
Upload limits depend on the destination server's Boost tier, not on the bot. Discord documents a 10 MiB default and says it may be higher depending on Nitro status (users) or the server's Boost Tier. Oversize uploads fail with 40005 at the transport layer or 50045 after parsing, and a file Discord cannot decode fails with 50046 regardless of size. Image fields that take data URIs (emoji, avatars, icons) and sticker uploads have their own, much smaller caps listed below. Validate sizes and formats locally before uploading so user-supplied files fail in your code with a clear message instead of at Discord.
| What | Limit |
|---|---|
| Attachment upload size | 10 MiB default |
| Boosted-server upload size | See docs / guild.premium_tier |
| Custom emoji image | 256 KiB |
| Files per message | 10 |
| Application-owned emoji | 2,000 per application |
| Premium (subscription role) emoji | 25 per guild |
| Sticker file | 512 KiB max, 320 x 320 px |
| Sticker name / description / tags | 2-30 / empty or 2-100 / up to 200 characters |
| Guild sticker slots | 5 free slots by default |
Slash commands and context menu commands
Application commands are registered per application (global) or per guild, with separate quotas for each command type. Names must be 1-32 characters, lowercase for CHAT_INPUT, matching the documented regex; descriptions 1-100. Registering more than the quota or breaking a name rule fails with 50035, creating too many in one day fails with 30034, and editing a command by a stale ID after a re-registration fails with 10063. Guild commands update instantly and are the right tool for development; global commands are what production bots should register, and the daily create budget is why registration belongs in a deploy script, not in startup code.
| What | Limit |
|---|---|
| Global CHAT_INPUT commands | 100 per application |
| Global USER commands | 15 per application |
| Global MESSAGE commands | 15 per application |
| PRIMARY_ENTRY_POINT commands | 1 per application |
| Daily command creates | 200 per day, per guild |
| Command name | 1-32 characters |
| Command description | 1-100 characters |
| Options per command | 25 |
| Option name / description | 1-32 / 1-100 characters |
| Choices per option | 25 |
| Subcommand nesting | One level of groups |
| Combined command text | 8,000 characters |
| Guild command propagation | Instant |
Interaction timing
Every interaction (slash command, button, select, modal) must receive an initial response quickly; after that the interaction token allows follow-ups for a limited time. Missing the initial deadline produces 10062 Unknown interaction and the user sees "The application did not respond"; responding twice produces 40060. The deadline is measured from when Discord created the interaction, not when your handler started, so hosting latency and cold starts eat into it. Deferring first (callback type 5, or type 6 for component updates) is the standard pattern: it satisfies the 3-second rule and converts the budget into the token's full 15-minute lifetime.
| What | Limit |
|---|---|
| Initial response deadline | 3 seconds |
| Interaction token lifetime | 15 minutes |
| Initial responses per interaction | 1 |
| Follow-ups for user-installed apps | 5 per interaction when not also installed in the server |
Message components
Buttons, select menus and text inputs live inside action rows (or, with the IS_COMPONENTS_V2 flag, inside layout components). Exceeding a count or length produces 50035 naming the component path. All interactive components need a custom_id of 1-100 characters, unique within the message. Remember that every click or selection is itself an interaction with the same 3-second acknowledgement deadline as a slash command, so a component-heavy UI inherits the 10062 failure mode too. Action rows are the v1 container; Components v2 replaces them with layout components and raises the total component count but adds a combined text cap.
| What | Limit |
|---|---|
| Action rows per message | 5 |
| Buttons per action row | 5 |
| Select menus per action row | 1 |
| Button label | 80 characters |
| custom_id | 1-100 characters |
| Select menu options | 25 |
| Select placeholder | 150 characters |
| Text input length | min_length 0-4000, max_length 1-4000 |
| Components v2 total components | 40 per message |
| Components v2 total text | 4,000 characters |
Webhooks
Webhooks post without a bot token and follow the same payload limits as messages. Channel capacity is capped at 15, and the 16th create fails with 30007; a deleted or mistyped webhook URL returns 10015 forever, so senders need a disable-on-404 path. Per-webhook execution buckets exist but their size is not published; read the rate limit headers on Execute Webhook responses. Webhooks can post into existing threads in any channel via the thread_id query parameter, but can only create new threads in forum and media channels; passing thread_name anywhere else fails with 220003.
| What | Limit |
|---|---|
| Webhooks per channel | 15 |
| Webhook name | 1-80 characters |
| Execute Webhook content | 2,000 characters |
| Execute Webhook rate | Per-webhook bucket; read X-RateLimit-Limit |
| Webhook thread creation | Forum and media channels only |
AutoMod rules
AutoMod rules are configured per guild through the auto-moderation endpoints, and every field on a rule has a documented ceiling: how many rules of each trigger type a server may have, how many keywords and regex patterns one rule may carry, and how long each entry may be. Bots that manage AutoMod hit these caps with 50035 at write time; bots that merely post content collide with the rules themselves, and a matching rule blocks the message with 200000 or the thread title with 200001. Reading a server's rules (Manage Guild required) is the reliable way to explain a block to a user, so the shape of these limits matters even to bots that never write a rule.
| What | Limit |
|---|---|
| Rules per guild, per trigger type | KEYWORD 6, MEMBER_PROFILE 1, SPAM 1, KEYWORD_PRESET 1, MENTION_SPAM 1 |
| keyword_filter | 1,000 keywords, each up to 60 characters |
| regex_patterns | 10 patterns, each up to 260 characters |
| allow_list | 100 entries (KEYWORD, MEMBER_PROFILE) or 1,000 (KEYWORD_PRESET) |
| mention_total_limit | Up to 50 unique role and user mentions |
| Block-message custom message | Up to 150 characters |
Server, channel, role and member limits
Per-server caps, mostly enforced through 30xxx error codes when a create call would exceed them, plus the field-length rules on guild, channel and role objects and the pagination limits on list endpoints. Several of these are ones bots silently exhaust over months of automated creation: the 251st role fails with 30005, the 501st channel with 30013, the 251st pin with 30003, and by the time the error fires the cleanup job is archaeology. Monitor the counts your bot grows (roles, channels, pins, invites, webhooks) instead of discovering the ceiling from a support ticket, and give every automated create a matching delete path.
| What | Limit |
|---|---|
| Roles per guild | 250 |
| Channels per guild | 500 |
| Pinned messages per channel | 250 |
| Invites per guild | 1,000 |
| Discovery categories per guild | 5 |
| Guild name | 2-100 characters |
| Channel / thread name | 1-100 characters |
| Channel topic | 0-1,024 characters (0-4,096 for forum and media channels) |
| Slowmode (rate_limit_per_user) | 0-21,600 seconds |
| Thread auto-archive | 60, 1440, 4320 or 10080 minutes |
| Forum available tags | 20 per channel; tag name 0-20 characters |
| Applied tags per forum post | 5 |
| Role name | 1-100 characters |
| Username | 2-32 characters |
| Nickname | 1-32 characters |
| AFK timeout | 60, 300, 900, 1800 or 3600 seconds |
| Voice bitrate | 96 kbps (no boost), 128 / 256 / 384 kbps at tiers 1 / 2 / 3 |
| List / Search Guild Members | 1-1,000 per request (default 1) |
| Get Current User Guilds | 1-200 per request (default 200) |
| Get Guild Audit Log | 1-100 entries per request (default 50) |
| Group DMs | 10 active group DMs per app |
| Opening DMs | Spam-limited; exact rate not published |
| Audit log reason (X-Audit-Log-Reason header) | 1-512 URL-encoded UTF-8 characters |
| Stage instance topic | 1-120 characters |
| Uncompleted scheduled events | 100 per guild |
Discord guides and tools
Other platforms
Frequently asked questions
What is the Discord API rate limit for bots?
Two layers. Globally, a bot may make 50 requests per second across all endpoints. Separately, each route has its own bucket whose size Discord does not publish; you read it from the X-RateLimit-Limit and X-RateLimit-Remaining headers on every response, and X-RateLimit-Bucket tells you which routes share a bucket. Exceeding either returns HTTP 429 with retry_after in seconds. Interaction callback endpoints are exempt from the global limit.
How long can a Discord bot message be?
2,000 characters of content. Nitro's longer limit applies to user accounts, not bots. Embeds extend what you can show: up to 10 embeds per message, each with a 4,096-character description, 25 fields of 1,024 characters, and a combined cap of 6,000 characters across all embed text. Exceeding any of these returns error 50035 Invalid Form Body naming the field.
What is the Discord gateway rate limit?
120 events per connection every 60 seconds, roughly 2 per second, including heartbeats. Exceeding it closes the WebSocket with code 4008 and you must reconnect. Identify has its own limit: max_concurrency identifies per 5 seconds (1 for most bots), and each app has a daily session start budget returned by GET /gateway/bot. Presence updates and Request Guild Members are the usual sources of 4008.
When does a Discord bot need sharding?
At 2,500 guilds. Each gateway shard can serve at most 2,500 guilds, and apps in 2,500 or more must identify with a shard array; otherwise the gateway closes with 4011 Sharding required. GET /gateway/bot returns the recommended shard count and max_concurrency. Most libraries enable sharding with one option, so turn it on before you approach the threshold.
How many slash commands can a Discord bot have?
100 global CHAT_INPUT (slash) commands per application, plus 15 USER and 15 MESSAGE context menu commands and 1 PRIMARY_ENTRY_POINT command. The same per-type quotas apply per guild for guild-scoped commands. Each command allows 25 options, each option 25 choices, names up to 32 characters and descriptions up to 100. You may create at most 200 commands per day per guild (error 30034).
What is the Discord bot file upload limit?
10 MiB per upload by default, with up to 10 attachments per message. Servers with Boost tiers allow larger uploads; read guild.premium_tier to know which applies. Nitro upload limits belong to user accounts and do not help a bot. Oversize uploads fail with 40005 Request entity too large or 50045 File uploaded exceeds the maximum size. Custom emoji images are capped at 256 KB.
How fast must a Discord bot respond to an interaction?
Within 3 seconds of the interaction being created, with an initial response: a message, a deferral (type 5 or 6), a modal or an update. After that, the interaction token stays valid for 15 minutes for editing the original reply and sending follow-ups through the webhook routes. Missing the 3-second window gives 10062 Unknown interaction; responding twice gives 40060 Interaction has already been acknowledged.
Which Discord privileged intents need approval, and at what size?
Server Members (GUILD_MEMBERS), Presence (GUILD_PRESENCES) and Message Content (MESSAGE_CONTENT). Any app can enable them with the toggles under Bot > Privileged Gateway Intents in the Developer Portal while it has fewer than 10,000 users. Above 10,000 unique users the app must be verified and approved for each intent it uses. Requesting a privileged intent that is not enabled or approved closes the gateway with code 4014.
What is Discord's invalid request limit, and what is a Cloudflare ban?
Requests that return 401, 403 or 429 count as invalid. An IP that produces 10,000 of them within 10 minutes is temporarily restricted from the whole API; the restriction is enforced by Cloudflare in front of Discord, so responses become HTML error pages instead of JSON until it expires. The usual cause is a retry loop around a bad token, a missing permission, or an unhandled 429, so fix the underlying error rather than retrying it.
How many AutoMod rules can a Discord server have?
Per trigger type: 6 KEYWORD rules, and 1 each of SPAM, KEYWORD_PRESET, MENTION_SPAM and MEMBER_PROFILE. A keyword rule holds up to 1,000 keywords of 60 characters each plus 10 regex patterns of up to 260 characters, with an allow list of 100 entries (1,000 for preset rules). When a rule matches content a bot sends, the message is blocked with error 200000 and thread titles with 200001.
Build on Discord without tracking every limit yourself
Conferbot paces sends, queues retries and surfaces limit errors as readable status.