# What changed in @chat-adapter/discord

> 47 changes in @chat-adapter/discord 4 from its official release notes, upgrade guides and advisories: 4 breaking, 3 security, 13 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/@chat-adapter/discord/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @chat-adapter/discord 4

### Breaking changes

- The interaction field is now typed as APIApplicationCommandInteraction for TypeScript consumers. (4.41.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.41.0)
- The user field is now typed as APIUser; user.avatar and user.global_name are string | null instead of optional strings. (4.41.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.41.0)
- Discord attachment downloads refuse private and internal addresses, including after DNS resolution and redirects, cap responses at 25 MB, and time out after 30 seconds. (4.39.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.39.0)
- Gateway mode ignores @everyone and @here pings by default; enable this option to restore the old behavior. (4.34.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.34.0)

### Security

- Callback tokens are consumed once. (4.40.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.40.0)
- External link metadata is marked as untrusted. (4.40.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.40.0)
- Adds custom webhook verification to the Discord adapter. (4.38.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.38.0)

### New APIs and options

- Adds scaffolding for Discord bots through the `--connect` option. (4.38.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.38.0)
- Adds Vercel Connect credential resolvers to the Discord adapter. (4.38.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.38.0)
- Adds an opt-in channel allowlist that treats non-bot Discord messages as directed to the bot without requiring a mention; configure it with respondToChannelIds or DISCORD_RESPOND_TO_CHANNEL_IDS. (4.35.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.35.0)
- Opt in to Discord Components v2 rendering for Chat SDK cards with DiscordContentFormat.ComponentsV2. (4.34.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.34.0)
- Forwarded gateway messages can opt in to responding to global mentions via the mention_everyone field. (4.34.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.34.0)
- Adds support for renaming native Discord thread channels. (4.34.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.34.0)
- The Discord adapter implements `rehydrateAttachment`, rebuilding `fetchData` from the serialized CDN URL so consumers can download inbound attachments after deserialization. (4.33.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.33.0)
- Adds a Discord adapter callback for setting flags on ephemeral slash command responses. (4.32.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.32.0)
- Adapter internals are now protected rather than private, allowing consumers to subclass an adapter and override or extend behavior such as processUpdate. (4.29.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.29.0)
- Adds a disabled prop to Button() for Discord, allowing developers to mark buttons as disabled. (4.16.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.16.0)
- Adds Discord slash command support by dispatching application command interactions to chat.processSlashCommand(...) while sending an immediate deferred interaction ACK. (4.16.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.16.0)
- Adds Partials.Channel to the gateway client to support DMs. (4.16.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.16.0)
- Adds table markdown rendering, allowing developers to render markdown tables through the adapter. (4.16.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.16.0)

### Behavior and default changes

- Failed channel or user lookups during forwarding are logged at warn instead of being silently dropped. (4.41.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.41.0)
- Forwarded reaction events now include channel_type, the resolved thread for thread reactions, and the reacting user for DM reactions, avoiding a second channel lookup on the webhook side. (4.41.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.41.0)
- AI tools are more tightly scoped. (4.40.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.40.0)
- Direct-message conversations are isolated. (4.40.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.40.0)
- Queued messages are more tightly scoped. (4.40.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.40.0)
- Slash commands and button interactions are handled in Discord gateway-only mode. (4.29.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.29.0)
- The adapter now declares chat as a full dependency rather than an optional dependency, so it is installed automatically. (4.21.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.21.0)
- Adapters have overhauled fallback-render behavior. (4.16.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.16.0)
- Markdown rendering is fully streaming, including for Slack, which has native streaming. (4.16.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.16.0)

### Fixes and other changes

- Forwards the Discord gateway packet as it arrived on the wire, preventing discord.js mutations from adding a member.user field Discord never sent. (4.42.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.42.0)
- Events for the same channel are forwarded in Gateway delivery order, preventing quick add-then-remove reactions from racing. (4.41.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.41.0)
- Discord reports true for real pings, role mentions, @everyone, or allowlisted channels, and leaves other cases undetermined so SDK text detection can still recognize literal @botname text. (4.41.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.41.0)
- Legacy Gateway mode falls back to channel_id for slash commands and button clicks in channels discord.js has not cached, such as a first DM. (4.41.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.41.0)
- Ephemeral follow-ups are preserved. (4.40.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.40.0)
- Edits, deletes, and reactions try the thread first and fall back to the parent channel when Discord reports the starter message as unknown. Deleting a text-channel thread's starter message also deletes the thread. (4.39.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.39.0)
- Restores attachment downloads across Discord inbound message paths. (4.38.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.38.0)
- Preserves content and attachments from forwarded Discord message snapshots. (4.38.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.38.0)
- Preserves Discord's angle-bracket syntax when rendering markdown so link previews can be suppressed. (4.35.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.35.0)
- Mention conversion no longer mangles email addresses, @handles inside URLs, or mentions inside code spans, and does not double-wrap already-formatted <@id> tokens. (4.33.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.33.0)
- Preserves surrounding text, email addresses, and word@word handles; avoids double-wrapping formatted mentions while still converting mentions after a period. (4.32.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.32.0)
- Renders bare URLs and autolinks as bare URLs instead of masked links, which Discord only renders inside embeds. (4.32.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.32.0)
- Expanded npm keywords for adapter and state packages to improve discoverability, adding chat-sdk, chatbot, ai-agent, ai-sdk, vercel, and platform-specific terms. (4.30.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.30.0)
- When Discord returns error code 160004 because a thread already exists for a message, the adapter reuses that thread instead of falling back to a standalone channel message. (4.24.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.24.0)
- Thread starter parsing now uses referenced_message content so thread roots preserve the original parent message text and metadata. (4.17.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.17.0)
- Fixes nested list rendering during Markdown-to-platform conversion so child items retain indentation and newline separation. (4.16.1) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.16.1)
- Fixes reaction events that were missing thread context. (4.16.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.16.0)
- Fixes the thread channel ID used for reactions and delete operations. (4.16.0) — [release notes](https://github.com/vercel/chat/releases/tag/%40chat-adapter/discord%404.16.0)
