@@ -2,6 +2,7 @@ package net.modfest.botfest.extensions
22
33import dev.kordex.core.commands.Arguments
44import dev.kordex.core.commands.application.slash.ephemeralSubCommand
5+ import dev.kordex.core.commands.application.slash.group
56import dev.kordex.core.commands.converters.impl.optionalString
67import dev.kordex.core.commands.converters.impl.string
78import dev.kordex.core.extensions.Extension
@@ -49,34 +50,38 @@ class UserCommands : Extension(), KordExKoinComponent {
4950 }
5051 }
5152
52- // Allows the user to add a minecraft username
53- ephemeralSubCommand(::MinecraftUsernameArgs ) {
54- name = Translations .Commands .User .Minecraft .Add .name
55- description = Translations .Commands .User .Minecraft .Add .description
53+ group(Translations .Commands .Group .User .Minecraft .name) {
54+ description = Translations .Commands .Group .User .Minecraft .description
5655
57- action {
58- platform.withAuth(this .user).addMinecraft(this .arguments.username)
56+ // Allows the user to add a minecraft username
57+ ephemeralSubCommand(::MinecraftUsernameArgs ) {
58+ name = Translations .Commands .User .Minecraft .Add .name
59+ description = Translations .Commands .User .Minecraft .Add .description
5960
60- respond {
61- content = Translations .Commands .User .Minecraft .Add .response
62- .withContext(this @action)
63- .translateNamed()
61+ action {
62+ platform.withAuth(this .user).addMinecraft(this .arguments.username)
63+
64+ respond {
65+ content = Translations .Commands .User .Minecraft .Add .response
66+ .withContext(this @action)
67+ .translateNamed()
68+ }
6469 }
6570 }
66- }
6771
68- // Allows the user to remove a minecraft username
69- ephemeralSubCommand(::MinecraftUsernameArgs ) {
70- name = Translations .Commands .User .Minecraft .Remove .name
71- description = Translations .Commands .User .Minecraft .Remove .description
72+ // Allows the user to remove a minecraft username
73+ ephemeralSubCommand(::MinecraftUsernameArgs ) {
74+ name = Translations .Commands .User .Minecraft .Remove .name
75+ description = Translations .Commands .User .Minecraft .Remove .description
7276
73- action {
74- platform.withAuth(this .user).removeMinecraft(this .arguments.username)
77+ action {
78+ platform.withAuth(this .user).removeMinecraft(this .arguments.username)
7579
76- respond {
77- content = Translations .Commands .User .Minecraft .Remove .response
78- .withContext(this @action)
79- .translateNamed()
80+ respond {
81+ content = Translations .Commands .User .Minecraft .Remove .response
82+ .withContext(this @action)
83+ .translateNamed()
84+ }
8085 }
8186 }
8287 }
0 commit comments