Skip to content

fix(discord): remove duplicate text when posting card messages#256

Merged
dancer merged 4 commits intomainfrom
246-discord-is-doing-text-embed-when-you-use-card-components
Apr 17, 2026
Merged

fix(discord): remove duplicate text when posting card messages#256
dancer merged 4 commits intomainfrom
246-discord-is-doing-text-embed-when-you-use-card-components

Conversation

@haydenbleasel
Copy link
Copy Markdown
Contributor

Resolves #246

@haydenbleasel haydenbleasel linked an issue Mar 16, 2026 that may be closed by this pull request
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 Apr 17, 2026 3:01pm
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 Apr 17, 2026 3:01pm

Copy link
Copy Markdown
Contributor

@bensabic bensabic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the duplicate content issue on create paths. I think there’s still one gap on editMessage.

In packages/adapter-discord/src/index.ts, the card branch now omits payload.content entirely when PATCHing an existing message. Discord’s Edit Message API treats fields as optional and nullable, so leaving content out does not reliably clear the previous body. If a normal text message is edited into a card, the old text can still remain alongside the embed/components.

I think this should explicitly clear content in the edit path ("" or null, depending on what we want to standardize on), and the test should cover editing a non-empty text message into a card rather than only asserting that the outgoing payload omits content.

@dancer dancer changed the title Fix Discord duplicate content fix(discord): remove duplicate text when posting card messages Apr 17, 2026
@dancer dancer merged commit 7e5b447 into main Apr 17, 2026
11 checks passed
@dancer dancer deleted the 246-discord-is-doing-text-embed-when-you-use-card-components branch April 17, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discord is doing text + embed when you use card components

3 participants