Discord API · error code

Discord error 20022: Announcement rate limit on message edit

RetryableHTTP 429Rate limits and slowmode

Last verified against Discord Developer Docs - Opcodes and status codes

What Discord returns
This message cannot be edited due to announcement rate limits

What error 20022 means

The message lives in an announcement channel (type 5, GUILD_ANNOUNCEMENT) and has been published (crossposted) to following servers. Discord limits how often a published message can be edited because every edit fans out to every follower channel. When you exceed that, edits are refused with 20022.

This is not a permissions problem and your bot is not misconfigured. It is a deliberate protection on the publish mechanism. Bots that post a status board or live-updating embed to an announcement channel and patch it every few seconds are the typical victims. The limit applies to the specific published message, so a new message is unaffected.

What it looks like

{
  "message": "The resource is being rate limited.",
  "retry_after": 600.0,
  "global": false,
  "code": 20022
}

Why it happens

  • Editing a crossposted announcement message repeatedly in a short window
  • Live-updating embed (scores, status, countdown) placed in an announcement channel
  • Retry loop that re-sends the same PATCH on failure, compounding the count

How to fix Discord error 20022

  1. 1Wait for retry_after from the response body, then edit once with the final content
  2. 2Move live-updating content to a regular text channel; reserve announcement channels for messages that rarely change
  3. 3Coalesce edits: accumulate changes and flush at most once every few minutes for published messages
  4. 4If the content must be in the announcement channel and must change often, post a new message instead of editing

How to stop it recurring

Check channel.type === 5 before wiring any auto-updating message, and route such messages elsewhere. Also check the message's flags for CROSSPOSTED (1 << 1) before scheduling edits, and apply a much slower edit cadence when set.

If you cannot avoid editing published messages, keep a per-message edit counter and timestamp in memory so you can see how close you are to the cap, and prefer deleting and re-publishing over many small edits when the content has changed substantially.

Announcement channels trade edit freedom for fan-out reach, so treat published messages as write-once. The related ceiling on editing any message older than an hour, 30046, catches the same live-dashboard designs; pacing strategies for both are in chatbot API rate limiting.

Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.

Related codes

Error 20022 - quick answers

What does Discord error 20022 mean?

The message lives in an announcement channel (type 5, GUILD_ANNOUNCEMENT ) and has been published (crossposted) to following servers. Discord limits how often a published message can be edited because every edit fans out to every follower channel. When you exceed that, edits are refused with 20022. This is not a permissions problem and your bot is not misconfigured.

How do I fix Discord error 20022?

1. Wait for retry_after from the response body, then edit once with the final content 2. Move live-updating content to a regular text channel; reserve announcement channels for messages that rarely change 3. Coalesce edits: accumulate changes and flush at most once every few minutes for published messages 4. If the content must be in the announcement channel and must change often, post a new message instead of editing

Can I retry after error 20022?

Yes - this is a retryable condition. Back off (start around one second and double on each attempt, with jitter) and watch for a retry-after hint from the platform before resending.

Stop debugging Discord by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.