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): use correct types #22

Merged
merged 4 commits into from
Oct 2, 2020

Conversation

NotSugden
Copy link
Contributor

@NotSugden NotSugden commented Sep 21, 2020

on the API docs for Create Guild (POST /guilds) there are a couple of info boxes stating that roles and channels can have an integer ID as a placeholder, eg for creating channel overwrites, this PR corrects these types into numbers

This PR also corrects the type for roles in RESTPostAPIGuildsJSONBody as it was previously typed as APIRole which isn't technically correct; the API won't accept permissons_new here,

afk_channel_id and system_channel_id are documented to be of type snowflake, but testing shows that the API accepts an integer, (there is an issue on the API about this discord/discord-api-docs#2089)

also i think these types need better names perhaps? im really not good with names so if anyones got suggestions

Copy link
Contributor

@TTtie TTtie left a comment

Choose a reason for hiding this comment

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

Seems good to me

v6/rest/guild.ts Outdated Show resolved Hide resolved
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.

Last changes before merge!

v6/rest/guild.ts Outdated Show resolved Hide resolved
v6/rest/guild.ts Outdated Show resolved Hide resolved
v6/rest/guild.ts Outdated Show resolved Hide resolved
v6/rest/guild.ts Outdated Show resolved Hide resolved
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

3 participants