chore(discord): update discord-api-types to 0.38 and dedupe types - #927
Merged
Merged
Conversation
Signed-off-by: Vlad Frangu <me@vladfrangu.dev>
…i-types Signed-off-by: Vlad Frangu <me@vladfrangu.dev>
Contributor
|
@vladfrangu is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Signed-off-by: Vlad Frangu <me@vladfrangu.dev>
…ng after the type swap
- Return `channel: undefined` for legacy Gateway interactions in channels discord.js has not cached, instead of throwing before the reply is deferred
- Route context menu commands to `onSlashCommand` under their command name again
- Forward Gateway events for the same channel in arrival order so a quick reaction add then remove cannot race
- Forward `thread: { id, parent_id }` for reactions posted in threads and honor it on the webhook side, skipping the second channel lookup
- Log failed channel and user lookups during reaction enrichment at warn
- Share one helper for interaction thread id encoding and thread parent caching
- Restore `DiscordComponentType` and `DiscordMessageFlag` as plain `as const` objects with values sourced from discord-api-types
- Widen `DiscordInteractionFlagsContext.interaction` to `APIApplicationCommandInteraction`
- Add `sample-messages.md` with payloads taken from the Discord replay fixture
- Add tests for each of the above and update the changeset
Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
bensabic
approved these changes
Sep 18, 2026
Contributor
Author
|
Any reason you peeps duplicated certain enums again? Why not reexport from discord-api-types? |
amitvijapur
added a commit
to amitvijapur/chat
that referenced
this pull request
Sep 20, 2026
…acket-snapshot Forwarding moved behind enqueueOrderedForward on main (vercel#946, vercel#927), which defers the task a microtask even on an empty queue, so the snapshot now happens in the raw handler before the enqueue and the clone is what gets forwarded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps
discord-api-typesto^0.38.55in@chat-adapter/discordand@chat-adapter/integration-tests(dedupes the copydiscord.jsalready pulls in) and replaces the adapter's hand-written Discord types with the upstream ones.types.tsnow only holds adapter config and the Gateway forwarding envelope.DiscordComponentTypeandDiscordMessageFlagre-exportComponentTypeandMessageFlagswith identical values.channel_typeand, when there is nomember,user. The webhook side read both but nothing populated them.v9import andGuildPublicThreadaliases, raw11/12channel comparisons, the unusedis_mentionfield, and the duplicateInteractionResponseTypefromdiscord-interactions.I have done this PR with the help of Claude Code using Fable 5.1, however the changes have been checked by me (the human). I have thoughts on some of the structures but I understand that you guys want to offer a consistent interface across different adapters.
There's also a secondary PR I want to open that moves off of raw fetch calls to discord and use
@discordjs/rest(which discord.js uses internally) but I'll wait for this PR first. I can open it in parallel if wantedTest plan
pnpm validatepasses.Checklist
git commit -s)pnpm validatepassesAGENTS.mdupdated to point atdiscord-api-types