Discord API · error code

Discord error 30015: Maximum number of attachments in a message reached (10)

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

Last verified against Discord Developer Docs - Opcodes and status codes

What Discord returns
Maximum number of attachments in a message reached (10)

What error 30015 means

A single message can carry at most 10 attachments, and your request included more. This applies to normal channel messages, webhook executions, and interaction responses that upload files with multipart/form-data.

The count is per message, not per request batch. Image-gallery bots, log exporters and "send all screenshots" commands are the common sources, usually because they pass a whole array of files straight into one send call.

This limit is independent of file size. A message with three very large files can fail with 40005 or 50045 while being well under 10 attachments, and a message with 11 tiny files fails here.

With multipart uploads, each file part (files[0], files[1] and so on) is matched to an entry in the attachments array of payload_json, so count both when you debug a rejected request.

What it looks like

{
  "message": "Maximum number of attachments in a message reached (10)",
  "code": 30015
}

Why it happens

  • Passing an unbounded array of files into a single send call
  • Combining new uploads with existing attachments when editing a message, pushing the total over 10
  • Webhook relay forwarding a message that already had several files plus extra ones
  • Embeds referencing attachment:// files that each count as an attachment

How to fix Discord error 30015

  1. 1Count the files before sending and split them into chunks of 10
  2. 2Send the chunks as consecutive messages, waiting for each to succeed before the next
  3. 3When editing, include the existing attachments you want to keep in the count
  4. 4Consider zipping many small files into one archive if users do not need inline previews

How to stop it recurring

Wrap your send function so it chunks attachments automatically and respects per-channel rate limits between chunks. Message, embed and attachment caps are listed together on the Discord limits page, which is the quickest place to check before designing a bulk-upload feature.

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

Related codes

Error 30015 - quick answers

What does Discord error 30015 mean?

A single message can carry at most 10 attachments, and your request included more. This applies to normal channel messages, webhook executions, and interaction responses that upload files with multipart/form-data . The count is per message, not per request batch.

How do I fix Discord error 30015?

1. Count the files before sending and split them into chunks of 10 2. Send the chunks as consecutive messages, waiting for each to succeed before the next 3. When editing, include the existing attachments you want to keep in the count 4. Consider zipping many small files into one archive if users do not need inline previews

Should I retry after error 30015?

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.