Class SlashCommand.Subcommand
java.lang.Object
xyz.dynxsty.dih4jda.interactions.commands.RestrictedCommand
xyz.dynxsty.dih4jda.interactions.commands.application.ApplicationCommand<net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent,net.dv8tion.jda.api.interactions.commands.build.SubcommandData>
xyz.dynxsty.dih4jda.interactions.commands.application.SlashCommand.Subcommand
- All Implemented Interfaces:
ExecutableCommand<net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent>
- Enclosing class:
SlashCommand
public abstract static class SlashCommand.Subcommand
extends ApplicationCommand<net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent,net.dv8tion.jda.api.interactions.commands.build.SubcommandData>
Model class which represents a single Subcommand.
-
Nested Class Summary
Nested classes/interfaces inherited from class xyz.dynxsty.dih4jda.interactions.commands.RestrictedCommand
RestrictedCommand.Cooldown
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnet.dv8tion.jda.api.interactions.commands.Command.Subcommand
Gets the correspondingJDA-entity
for this subcommand.Gets theparent
for this subcommand.Methods inherited from class xyz.dynxsty.dih4jda.interactions.commands.application.ApplicationCommand
getCommandData, setCommandData
Methods inherited from class xyz.dynxsty.dih4jda.interactions.commands.RestrictedCommand
applyCooldown, getCommandCooldown, getRequiredGuilds, getRequiredPermissions, getRequiredRoles, getRequiredUsers, hasCooldown, retrieveCooldown, setCommandCooldown, setRequiredGuilds, setRequiredPermissions, setRequiredRoles, setRequiredUsers
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface xyz.dynxsty.dih4jda.interactions.commands.ExecutableCommand
execute
-
Constructor Details
-
Subcommand
public Subcommand()Creates a default instance.
-
-
Method Details
-
getParent
Gets theparent
for this subcommand.- Returns:
- The corresponding
SlashCommand
.
-
asSubcommand
@Nullable public net.dv8tion.jda.api.interactions.commands.Command.Subcommand asSubcommand()Gets the correspondingJDA-entity
for this subcommand. If the subcommand was not cached or queued before (e.g. when using sharding), this may return null.- Returns:
- The
Command.Subcommand
corresponding to this class.
-