Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to create subcommands #15

Open
PillageDev opened this issue May 1, 2024 · 1 comment
Open

Ability to create subcommands #15

PillageDev opened this issue May 1, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@PillageDev
Copy link

Is your feature request related to a problem? Please describe.
Not able to create subcommands like you are in JDA. For example:

GuildUtils.getGuild().upsertCommand("manage", "Manage settings")
                .addSubcommands(
                        new SubcommandData("cooldown", "Manage user cooldowns")
                                .addOptions(
                                        new OptionData(OptionType.STRING, "gamemode", "The game mode you want to test the user in", true)
                                                .addChoices(Constants.ALL_GAMEMODE_CHOICES)
                                )
                                .addOptions(new OptionData(OptionType.USER, "user", "The user you want to manage", true))
                                .addOptions(new OptionData(OptionType.STRING, "action", "The action you want to perform", true)
                                        .addChoices(
                                                new Command.Choice("Terminate", "terminate"),
                                                new Command.Choice("Shorten", "Shorten"),
                                                new Command.Choice("Lengthen", "lengthen")
                                        )
                                )
                                .addOptions(new OptionData(OptionType.INTEGER, "amount", "The amount you want to shorten or lengthen the cooldown by", false))
                )

Describe the solution you'd like
Creating a command group on the initialization of the integration, like:

JDAIntegration commandIntegration = new JDAIntegration(jda);
KCommando commando = new KCommando(commandIntegration)
        ......
        .addCommandGroup(new CommandGroup("group 1", "desc for group 1"))

**Describe alternatives you've considered**
Using plain JDA

**Additional context**
None
@PillageDev PillageDev added the enhancement New feature or request label May 1, 2024
@PillageDev
Copy link
Author

#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant