Files
ahahahaandClaude Opus 4.6 acf85dc457 fix(discord): accept PDF and other file attachments from inbound messages (#609)
Discord's MessageCreate handler only routed audio/* and image attachments
(detected via Width/Height) into core.Message, silently dropping PDFs,
documents, archives, and any other file type. Tighten image detection to
image/* content type (with a legacy width/height fallback when ContentType
is missing), and fall through to Message.Files for everything else so
downstream agents receive the bytes the same way telegram/feishu already do.

Refactored the attachment loop into classifyAttachments() for testability
and added regression coverage for PDFs, zips, legacy images without
ContentType, and per-attachment download failures.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-28 22:12:11 +08:00
..