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

Remove Optional from CommandInteraction.options #1965

Conversation

tandemdude
Copy link
Contributor

Summary

Semantically, None options and [] options are the same - it is slightly nicer to remove the Optional type hint in this case to prevent a user having to do extra type assertions. This pr types options as purely a sequence, and deserializes to an empty sequence (tuple) when not provided in the interaction payload.

Checklist

  • I have run nox and all the pipelines have passed.
  • I have made unittests according to the code I have added/modified/deleted.

Related issues

Sorry, something went wrong.

Unverified

This user has not yet uploaded their public signing key.
… sequence

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.
@davfsa davfsa merged commit 7cc7f3b into hikari-py:master Jul 16, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants