Class SlashCommand.SubcommandGroup
java.lang.Object
xyz.dynxsty.dih4jda.interactions.commands.application.SlashCommand.SubcommandGroup
- Enclosing class:
SlashCommand
Model class which represents a single subcommand group.
This simply holds the
SubcommandGroupData and an array of all SlashCommand.Subcommands.-
Method Summary
Modifier and TypeMethodDescriptionnet.dv8tion.jda.api.interactions.commands.build.SubcommandGroupDatagetData()Gets theSubcommandGroupData.Gets theSlashCommand.Subcommand.static SlashCommand.SubcommandGroupof(net.dv8tion.jda.api.interactions.commands.build.SubcommandGroupData data, SlashCommand.Subcommand... subcommands) Creates a new instance of theSlashCommand.SubcommandGroupclass.
-
Method Details
-
of
@Nonnull public static SlashCommand.SubcommandGroup of(@Nonnull net.dv8tion.jda.api.interactions.commands.build.SubcommandGroupData data, @Nonnull SlashCommand.Subcommand... subcommands) Creates a new instance of theSlashCommand.SubcommandGroupclass.- Parameters:
data- TheSubcommandGroupDatato use.subcommands- An array ofSlashCommand.Subcommands. This should NOT be empty!- Returns:
- The
SlashCommand.SubcommandGroup.
-
getData
@Nonnull public net.dv8tion.jda.api.interactions.commands.build.SubcommandGroupData getData()Gets theSubcommandGroupData.- Returns:
- The corresponding
SubcommandGroupData.
-
getSubcommands
Gets theSlashCommand.Subcommand.- Returns:
- An array of
SlashCommand.Subcommands.
-