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

feat(CommandInteractionOptionResolver): add sub-command required option #6165

Merged
merged 4 commits into from Jul 23, 2021
Merged

feat(CommandInteractionOptionResolver): add sub-command required option #6165

merged 4 commits into from Jul 23, 2021

Conversation

memikri
Copy link
Contributor

@memikri memikri commented Jul 21, 2021

Please describe the changes this PR makes and why it should be merged:
This adds a required parameter to the getSubCommand() and getSubCommandGroup() methods, defaulted to true (as opposed to false in option getters), to allow for optional checking of sub-commands if needed (e.g. logging) without changing the current default behavior that enforces strict command definitions.

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)

@iCrawl iCrawl added this to the Version 13 milestone Jul 22, 2021
src/structures/CommandInteractionOptionResolver.js Outdated Show resolved Hide resolved
src/structures/CommandInteractionOptionResolver.js Outdated Show resolved Hide resolved
typings/index.d.ts Show resolved Hide resolved
typings/index.d.ts 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.

🧹

typings/index.d.ts Outdated Show resolved Hide resolved
@memikri memikri requested a review from vladfrangu July 22, 2021 16:33
@iCrawl iCrawl merged commit 690c121 into discordjs:master Jul 23, 2021
@memikri memikri deleted the feat/optionresolver-optional-sub-commands branch July 23, 2021 21:09
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

5 participants