Skip to content

Commit

Permalink
Fix children checks with Commands in SlashCommands
Browse files Browse the repository at this point in the history
If a command had children, they weren't checked if the class extended SlashCommand. It does now. How did this fix it? Who knows.
  • Loading branch information
Chew committed Jun 29, 2021
1 parent 70fcb75 commit 9eef628
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public final void run(CommandEvent event)
helpBiConsumer.accept(event, this);
return;
}
for(Command cmd: children)
for(Command cmd: getChildren())
{
if(cmd.isCommandFor(parts[0]))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public final void run(SlashCommandEvent event, CommandClient client)
// child check
if(event.getSubcommandName() != null)
{
for(SlashCommand cmd: children)
for(SlashCommand cmd: getChildren())
{
if(cmd.isCommandFor(event.getSubcommandName()))
{
Expand Down

0 comments on commit 9eef628

Please sign in to comment.