JDA-Chewtils
JDA-Chewtils copied to clipboard
Fix slash command children in groups matching children with the same name
Pull Request
Pull Request Checklist
Please follow the following steps before opening this PR.
PRs that do not complete the checklist will be subject to denial for
missing information.
- [X] I have checked the pull request page for upcoming or merged features/bug fixes.
- [X] I have read JDA's contributing guidelines.
Pull Request Information
Check and fill in the blanks for all that apply:
- [X] My PR fixes a bug, error, or other issue with the library's codebase.
- [X] My PR is for the
commandsmodule of the JDA-Utilities library. - [ ] My PR creates a new module for the JDA-Utilities library:
______.
Description
Currently, when checking if a slash command children matches the interaction, the client does not properly check if the child is in not in a group. This PR fixes that by making sure that a command with a child only matches children without a subcommand, and that slash commands with children and a group match the same group, and do not throw NPEs while checking.
Will do some testing on this in a bit.