RateĀ limits

Limits are per bot, so another bot never eats your budget. The SDKs queue and retry for you; here is what they handle.

REST

LimitValue
All requests of a bot50 per second (global: true when hit)
Posts and uploads per channel5 per 5 seconds (an edit that sends allowed_mentions counts as a post)
Wrong tokens per client address30 a minute
A channel's slow modeapplies to bots like to members, unless the bot has Manage messages

A 429 carries a Retry-After header and:

{"message": "You are being rate limited.", "retry_after": 1.2, "global": false}

Wait retry_after seconds, then retry.

Gateway

LimitValue
Frames from the bot120 a minute, at most 4096 bytes each
Live connections per bot3 (plus 6 resumable sessions)
Presence updates5 per 60 seconds per bot; extra ones are dropped
Too many frames, IDENTIFYs or connectionsclosed with 4008

Interactions

LimitValue
Command runs per member20 a minute
Clicks and modal submits per member30 a minute
Messages per interaction5 in total (first answer, the deferred message and follow-ups)
Answer window15 minutes

What the SDKs do

Both SDKs read the rate-limit headers, queue requests per bucket and retry a 429 after retry_after. They also keep the heartbeat, resume within the window and reconnect with back-off. Their sections on rate limits and reconnects: TypeScript, Go.

Something wrong on this page? Tell us.