From f4ee258eb1684acee8de82a2437ff4bf92ad4965 Mon Sep 17 00:00:00 2001 From: Tueem Date: Mon, 3 Mar 2025 23:40:06 +0100 Subject: [PATCH] remove missing parent() call in SlashCommandDefinition#getSubCommands() --- .../marinara/interaction/commands/SlashCommandDefinition.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/SlashCommandDefinition.java b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/SlashCommandDefinition.java index 5a2f861..a1525c9 100644 --- a/lib/src/main/java/net/tomatentum/marinara/interaction/commands/SlashCommandDefinition.java +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/commands/SlashCommandDefinition.java @@ -72,7 +72,7 @@ public class SlashCommandDefinition { public SlashCommandIdentifier[] getSubCommands() { if (isRootCommand) return null; - return InteractionIdentifier.distinct(entries.stream().filter(x -> x instanceof RootCommandIdentifier).toList()).toArray(SlashCommandIdentifier[]::new); + return InteractionIdentifier.distinct(entries.stream().filter(x -> x.parent() instanceof RootCommandIdentifier).toList()).toArray(SlashCommandIdentifier[]::new); } public SlashCommandIdentifier[] getSubCommands(String groupName) {