Skip to content

Conversation

krittick
Copy link
Contributor

@krittick krittick commented Feb 5, 2022

Summary

Adds two new properties to ApplicationContext:

selected_options - Returns a dictionary containing the options and values that were selected by the user when the command was processed, if applicable.

unselected_options - Returns a list of Option objects (if any) that were not selected by the user when the command was processed.

These are mostly useful for handling things like command logging in on_application_command and such, and serves as an easier way to get the data than the user needing to do the parsing of actx.interaction.data themselves.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, typehinting, examples, ...)

@krittick krittick added status: in progress Work in Progess feature Implements a feature labels Feb 5, 2022
@krittick krittick self-assigned this Feb 5, 2022
@Lulalaby Lulalaby added this to the v2.1 milestone Feb 5, 2022
@krittick krittick marked this pull request as ready for review February 6, 2022 04:37
@krittick krittick added status: awaiting review Awaiting review from a maintainer and removed status: in progress Work in Progess labels Feb 6, 2022
@krittick krittick enabled auto-merge February 6, 2022 04:39
@krittick krittick modified the milestones: v2.1, v2.0 Feb 6, 2022
Copy link
Member

@ChickenDevs ChickenDevs left a comment

Choose a reason for hiding this comment

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

LGTM

@krittick krittick merged commit e50c239 into Pycord-Development:master Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Implements a feature priority: medium Medium Priority status: awaiting review Awaiting review from a maintainer
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

6 participants