Closed VelvetToroyashi closed 3 years ago
This is a known issue/intended behaviour. You're supposed to create a group inside your main command class, marking the command class as a group does nothing. You should be doing
public class GroupedCommands : SlashCommandModule
{
[SlashCommandGroup("test", "Testing!")]
public class Test : SlashCommandModule
{
[SlashCommandGroup("testing", "aaaaa")]
public class Test2 : SlashCommandModule
{
[SlashCommand("aaaa", "aaaa, but 1")]
public Task A(InteractionContext ctx) => ctx.CreateResponseAsync(InteractionResponseType.ChannelMessageWithSource, new() {Content = "A", IsEphemeral = true});
[SlashCommand("bbbb", "aaaa, but 1")]
public Task B(InteractionContext ctx) => ctx.CreateResponseAsync(InteractionResponseType.ChannelMessageWithSource, new() {Content = "B", IsEphemeral = true});
[SlashCommand("cccc", "aaaa, but 1")]
public Task C(InteractionContext ctx) => ctx.CreateResponseAsync(InteractionResponseType.ChannelMessageWithSource, new() {Content = "C", IsEphemeral = true});
}
}
}
Requiring a nested type for make a slash command group is a bit...cumbersome.
Especially when all you want is a group
This has been fixed in the latest version
Attempting to mark a class a group, and putting methods inside that class registers them as top-level commands instead of group commands.
Registers them properly But doing something like:
Registers them as top-level commands
This is all based on what's advised in the readme