Class ApplicationCommand<E extends net.dv8tion.jda.api.events.interaction.command.GenericCommandInteractionEvent,T>
java.lang.Object
xyz.dynxsty.dih4jda.interactions.commands.RestrictedCommand
xyz.dynxsty.dih4jda.interactions.commands.application.ApplicationCommand<E,T>
- Type Parameters:
E- The event this class uses.T- The type ofCommandDatathis class uses.
- All Implemented Interfaces:
ExecutableCommand<E>
- Direct Known Subclasses:
BaseApplicationCommand,SlashCommand.Subcommand
public abstract class ApplicationCommand<E extends net.dv8tion.jda.api.events.interaction.command.GenericCommandInteractionEvent,T>
extends RestrictedCommand
implements ExecutableCommand<E>
Model class for all Application Commands.
For top-level commands, see
BaseApplicationCommand which features an additional RegistrationType.-
Nested Class Summary
Nested classes/interfaces inherited from class xyz.dynxsty.dih4jda.interactions.commands.RestrictedCommand
RestrictedCommand.Cooldown -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal TGets the command data that was previously set withsetCommandData(Object)final voidsetCommandData(T data) Sets this commands'CommandData.Methods inherited from class xyz.dynxsty.dih4jda.interactions.commands.RestrictedCommand
applyCooldown, getCommandCooldown, getRequiredGuilds, getRequiredPermissions, getRequiredRoles, getRequiredUsers, hasCooldown, retrieveCooldown, setCommandCooldown, setRequiredGuilds, setRequiredPermissions, setRequiredRoles, setRequiredUsersMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface xyz.dynxsty.dih4jda.interactions.commands.ExecutableCommand
execute
-
Constructor Details
-
ApplicationCommand
public ApplicationCommand()Creates a defaultApplicationCommand.
-
-
Method Details
-
setCommandData
Sets this commands'CommandData.- Parameters:
data- TheCommandDatawhich should be used for this application command.
-
getCommandData
Gets the command data that was previously set withsetCommandData(Object)- Returns:
- the command data object.
- Throws:
IllegalArgumentException- if data is null.
-