JDA-Chewtils icon indicating copy to clipboard operation
JDA-Chewtils copied to clipboard

Fix slash command children in groups matching children with the same name

Open Matyrobbrt opened this issue 2 years ago • 1 comments

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.

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 commands module 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.

Matyrobbrt avatar May 01 '23 19:05 Matyrobbrt

Will do some testing on this in a bit.

Chew avatar Jun 28 '23 19:06 Chew