fix(Interactions): make app_permissions required #652
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes
app_permissions
required in application command and message component interactions, wherechannel_id
anddata
are set to required.Currently discord-api-types is very inconsistent about interaction required fields and more work should probably be done to fix that; this might be due to the docs also being inconsistent about these
locale is set as required in the interaction structure but then removed in ping
data is set as optional in the interaction structure but then set as required in all subinterfaces except ping
channel_id is set as optional in the interaction structure but then set as required for cmds and components, although it should also be required in autocomplete and modal submit
for now I just made autocomplete copy channel_id's current behavior as a quick fix, but this should be straightened out in general tbh. I'll see if we can get the docs cleaned up