- Symptom
- DiscordAPIError[50035]: Invalid Form Bodycontent[BASE_TYPE_MAX_LENGTH]: Must be 2000 or fewer in length.Bot relaying LLM or log output fails only on long answers
- Cause
- Message content is capped at 2000 characters for bots, webhooks and interaction replies alike. Discord counts Unicode code points, so JavaScript string length can overcount emoji but never undercounts.
- Fix
- Split long text into chunks of at most 2000 characters, or send it as a file attachment.
- Apply
for (const part of text.match(/[\s\S]{1,2000}/g) ?? []) { await channel.send({ content: part, allowedMentions: { parse: [] } }); }- Affected
- Discord API v10 messages, webhooks and interaction responses, as of 2026-10
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders