Skip to content
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

entity_metadata is nullable when updating a guild scheduled event #1584

Open
itohatweb opened this issue Mar 12, 2022 · 2 comments
Open

entity_metadata is nullable when updating a guild scheduled event #1584

itohatweb opened this issue Mar 12, 2022 · 2 comments
Labels
c-http Affects the http crate d-api Change related to Discord's API. d-breaking Code breaks the API because of Discord t-feature Addition of a new feature

Comments

@itohatweb
Copy link
Member

According to the latest changes to the Discord docs UpdateGuildScheduledEventFields::entity_metadata is now a nullable field.

Reference: discord/discord-api-docs@074e930

@itohatweb itohatweb added c-http Affects the http crate d-api Change related to Discord's API. d-breaking Code breaks the API because of Discord t-feature Addition of a new feature labels Mar 12, 2022
@itohatweb itohatweb assigned itohatweb and unassigned itohatweb Mar 12, 2022
@itohatweb
Copy link
Member Author

Actually currently EntityMetadataFields only has a location (which is optional) so there is no need to make EntityMetadataFields nullable for now until discord adds a new field?
Should this change still be reflected in code or not?

@7596ff
Copy link
Contributor

7596ff commented Mar 12, 2022

There could still be a future-proofing code change made here. We could make entity_metadata: Option<NullableField<EntityMetadata>>, and add a check on each method that modifies it, which nulls the field itself if all of the metadata's fields are None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-http Affects the http crate d-api Change related to Discord's API. d-breaking Code breaks the API because of Discord t-feature Addition of a new feature
Projects
None yet
Development

No branches or pull requests

2 participants