Skip to content

Specify that the additional partial member field is optional #7678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lipfangmoe
Copy link

@lipfangmoe lipfangmoe commented Jul 11, 2025

I came across a parsing error in zigcord (https://codeberg.org/lipfang/zigcord) which had incorrectly assumed that the member field within mentions array of the Message Create gateway event was required.

Not quite sure if this falls under "subjective wording changes" in the contributing guidelines, but I feel that the statement is incorrect since it seems to assert that the member field is required.

The following message is an example of a message which contains a mentions property that contains users which don't have member fields. It is a message from the Wordle Discord Bot with a summary of those who have played wordle today, mentioning many guild members.

https://gist.github.com/lipfangmoe/6130b9a42a4396ddb4f62ec91c0a6527

@lipfangmoe lipfangmoe requested a review from a team as a code owner July 11, 2025 05:57
@lipfangmoe lipfangmoe requested review from anthonydiscord and removed request for a team July 11, 2025 05:57
@Rapptz
Copy link
Contributor

Rapptz commented Jul 11, 2025

For what it's worth, the member info is not present for users who got banned or kicked or just left so the assumption that it's required wouldn't have made sense to begin with.

@lipfangmoe
Copy link
Author

@Rapptz I mean, when I was trying to statically type the entirety of the Discord REST API, I wasn't always thinking about the logic of why certain options are provided / not provided unless its relevant to the type. I was just writing down the types that the docs say :/ This definitely would've been helpful to have

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy