Creating a top-level slash command group

I'm trying to make a root/top-level command group. My current code is this:
publicSlashCommand {
name = Translations.Commands.Mirror.name
description = Translations.Commands.Mirror.description
guild(TEST_SERVER_ID)

publicSubCommand(arguments = ::LogArgs) {
name = Translations.Commands.Mirror.Log.name
description = Translations.Commands.Mirror.Log.description

action {
logger.info { arguments.message }
}
}
}
publicSlashCommand {
name = Translations.Commands.Mirror.name
description = Translations.Commands.Mirror.description
guild(TEST_SERVER_ID)

publicSubCommand(arguments = ::LogArgs) {
name = Translations.Commands.Mirror.Log.name
description = Translations.Commands.Mirror.Log.description

action {
logger.info { arguments.message }
}
}
}
This doesn't cause any errors, but the commands are not shown (presumably because the root command is invalid due to not having an action block). How can I get around this without making the root command executable?
Solution:
bah, i ran it again and suddenly everything works now.
Jump to solution
3 Replies
gdude
gdude3d ago
Nope that looks correct Your root command in fact cannot be executable Try enabling debug logging just to check the output
Solution
ADudeCalledLeo
bah, i ran it again and suddenly everything works now.
gdude
gdude3d ago
ahaha the recompilation blues it happens

Did you find this page helpful?