Discord API · error code

Discord error 30005: Maximum number of guild roles reached (250)

Permanent - do not retryHTTP 400Maximum reached (30xxx)

Last verified against Discord Developer Docs - Opcodes and status codes

What Discord returns
Maximum number of guild roles reached (250)

What error 30005 means

The guild already has 250 roles, which is the hard cap per server, and the Create Guild Role call was rejected. Bots that create a role per feature (per-user color roles, per-game roles, temporary event roles, reaction-role generators) are the usual culprits. Because roles are rarely cleaned up, a server that adopted such a bot months ago can sit at 249 with no one noticing.

The cap counts every role including @everyone, integration-managed roles (one per bot), and booster/linked roles. A server with 40 bots has 40 managed roles before any human-created ones.

What it looks like

{
  "message": "Maximum number of guild roles reached (250)",
  "code": 30005
}

Why it happens

  • Per-user or per-item role creation without a cleanup path
  • Reaction-role or self-assign setup with many roles
  • Many bot integrations, each consuming a managed role
  • Duplicate role creation on every bot restart because the bot does not check for existing roles first

How to fix Discord error 30005

  1. 1GET /guilds/{guild.id}/roles and count; tell the server admin they are at 250
  2. 2Look for roles with zero members (requires the Server Members intent or a member scan) and delete unused ones
  3. 3Change the bot to look up an existing role by name or stored ID before creating a new one
  4. 4Replace per-user roles with a different mechanism where possible (for example one role plus a database flag)

How to stop it recurring

Never create roles implicitly. Create them once on setup, store the ID, and reuse. If a feature genuinely needs dynamic roles, give them a TTL and delete them when they are no longer referenced, and surface a warning in the bot's UI when the guild passes 200 roles.

Role exhaustion is invisible until it breaks onboarding, so surface the count. The 250-role cap and its neighbors are tabulated on the Discord limits page; when role assignment rather than creation fails, the cause is usually hierarchy and lands on 50013 instead, so check which of the two codes you are actually getting before deleting anything.

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

Related codes

Error 30005 - quick answers

What does Discord error 30005 mean?

The guild already has 250 roles, which is the hard cap per server, and the Create Guild Role call was rejected. Bots that create a role per feature (per-user color roles, per-game roles, temporary event roles, reaction-role generators) are the usual culprits. Because roles are rarely cleaned up, a server that adopted such a bot months ago can sit at 249 with no one noticing.

How do I fix Discord error 30005?

1. GET /guilds/{guild.id}/roles and count; tell the server admin they are at 250 2. Look for roles with zero members (requires the Server Members intent or a member scan) and delete unused ones 3. Change the bot to look up an existing role by name or stored ID before creating a new one 4. Replace per-user roles with a different mechanism where possible (for example one role plus a database flag)

Should I retry after error 30005?

No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.

Stop debugging Discord by hand

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