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(APIApplicationCommandAutocompleteInteraction): make options field required #332

Merged
merged 3 commits into from Feb 15, 2022
Merged

Conversation

andre4ik3
Copy link
Contributor

Please describe the changes this PR makes and why it should be merged:

  • Makes the options field required for autocomplete interactions
  • Even though it is technically "optional" in the docs, in practice it will always be there when receiving an interaction
  • The whole point of an autocomplete interaction is that a user is typing out an option. Therefore autocomplete interaction cannot be sent without options.

If applicable, please reference Discord API Docs PRs or commits that influenced this PR:

@andre4ik3
Copy link
Contributor Author

Uh oh, I think there is issue with the test

@andre4ik3
Copy link
Contributor Author

Not sure if there is a better way to do this, I never used type testing before

tests/v9/interactions.test-d.ts Outdated Show resolved Hide resolved
@vladfrangu vladfrangu changed the title fix(Autocomplete): Make options field required for autocomplete interaction fix(APIApplicationCommandAutocompleteInteraction): make options field required Feb 15, 2022
@vladfrangu vladfrangu merged commit 5396daf into discordjs:main Feb 15, 2022
@andre4ik3 andre4ik3 deleted the patch-2 branch February 17, 2022 19:09
vladfrangu pushed a commit that referenced this pull request Feb 18, 2022
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