Skip to content

Conversation

@Jiralite
Copy link
Member

@Jiralite Jiralite commented May 7, 2025

Please describe the changes this PR makes and why it should be merged:
When fetching a group direct message invite, I encountered this:

image

icon and recipients were undefined. Looking at the specification, only id and type are definitely sent:

https://github.com/discord/discord-api-spec/blob/507909d1ea5a921064d599e1f3b57163af2037d6/specs/openapi.json#L23049-L23052

This pull request puts sensible defaults into place.

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@vercel
Copy link

vercel bot commented May 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) Visit Preview May 7, 2025 4:43pm
discord-js-guide ⬜️ Ignored (Inspect) Visit Preview May 7, 2025 4:43pm

Copy link
Member

@almeidx almeidx left a comment

Choose a reason for hiding this comment

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

Looking at the specification, only id and type are definitely sent

Perhaps we should also add ?? null to the name prop then

@github-project-automation github-project-automation bot moved this from Todo to Review Approved in discord.js May 7, 2025
@kodiakhq kodiakhq bot merged commit 320e3a6 into main May 7, 2025
8 checks passed
@kodiakhq kodiakhq bot deleted the fix/channel-from-invite branch May 7, 2025 16:45
@github-project-automation github-project-automation bot moved this from Review Approved to Done in discord.js May 7, 2025
Jiralite added a commit that referenced this pull request May 7, 2025
fix(PartialGroupDMChannel): prevent `undefined` values

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants