diff --git a/application/src/main/java/org/togetherjava/tjbot/features/system/BotCore.java b/application/src/main/java/org/togetherjava/tjbot/features/system/BotCore.java index da4e47fcd8..c87153428b 100644 --- a/application/src/main/java/org/togetherjava/tjbot/features/system/BotCore.java +++ b/application/src/main/java/org/togetherjava/tjbot/features/system/BotCore.java @@ -382,14 +382,16 @@ public void onSlashCommandInteraction(SlashCommandInteractionEvent event) { logger.debug("Received slash command '{}' (#{}) on guild '{}'", name, event.getId(), event.getGuild()); COMMAND_SERVICE.execute(() -> { - SlashCommand interactor = requireUserInteractor( UserInteractionType.SLASH_COMMAND.getPrefixedName(name), SlashCommand.class); - metrics.count("slash-" + name); + String eventName = "slash-" + name; + if (event.getSubcommandName() != null) { + eventName += "_" + event.getSubcommandName(); + } + metrics.count(eventName); interactor.onSlashCommand(event); - }); }