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

fix(RESTPostAPIGuildsJSONBody): make some fields nullable #91

Merged
merged 1 commit into from
Feb 17, 2021
Merged

fix(RESTPostAPIGuildsJSONBody): make some fields nullable #91

merged 1 commit into from
Feb 17, 2021

Conversation

cherryblossom000
Copy link
Contributor

This PR makes afk_channel_id and system_channel_id in RESTPostAPIGuildsJSONBody and parent_id in APIGuildCreatePartialChannel nullable.

These types are used in the following:

  • RESTPostAPIGuildsJSONBody: I tested creating a guild using POST /guilds with a null afk_channel_id and system_channel_id, and a channel with a null parent_id, and it worked.
  • APITemplate (via APITemplateSerializedSourceGuild): The example template object in the docs includes a null afk_channel_id and a null parent_id for a channel. I also tested creating a template from a guild without a system channel and the system_channel_id in the returned template object was null.
  • RESTPostAPIGuildChannelJSONBody: I tested creating a channel using POST /guilds/:id/channels with a null parent_id in the JSON body, and it worked.

Copy link
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

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

LGTM!

@vladfrangu vladfrangu merged commit ae1900d into discordjs:main Feb 17, 2021
@cherryblossom000 cherryblossom000 deleted the nullable-guild-create-fields branch February 17, 2021 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants