fix: Fix alias not being registered for group subcommands

This commit is contained in:
Ahmad Ansori Palembani 2025-05-23 15:29:16 +07:00
parent 513959d4a7
commit b22cf439ad
5 changed files with 44 additions and 7 deletions

View file

@ -16,7 +16,9 @@ val generalModule = botModules("General") {
groups("group") {
commands("test", arguments = ::Test2Arguments) { ctx, args -> ctx.reply("Hello world ${args.user}") }
groups("group") {
commands("test", arguments = ::TestArguments) { ctx, args -> ctx.reply("Hello world ${args.test}") }
commands("test", alias = setOf("t")) { ctx ->
ctx.reply("Hello world ${ctx.command?.module?.name}")
}
}
}