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.Subcommand
s.-
Method Summary
Modifier and TypeMethodDescriptionnet.dv8tion.jda.api.interactions.commands.build.SubcommandGroupData
getData()
Gets theSubcommandGroupData
.Gets theSlashCommand.Subcommand
.static SlashCommand.SubcommandGroup
of
(net.dv8tion.jda.api.interactions.commands.build.SubcommandGroupData data, SlashCommand.Subcommand... subcommands) Creates a new instance of theSlashCommand.SubcommandGroup
class.
-
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.SubcommandGroup
class.- Parameters:
data
- TheSubcommandGroupData
to use.subcommands
- An array ofSlashCommand.Subcommand
s. 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.Subcommand
s.
-