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 ofCommandData
this 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
-
Method Summary
Modifier and TypeMethodDescriptionfinal T
Gets the command data that was previously set withsetCommandData(Object)
final void
setCommandData
(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, 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
-
ApplicationCommand
public ApplicationCommand()Creates a defaultApplicationCommand
.
-
-
Method Details
-
setCommandData
Sets this commands'CommandData
.- Parameters:
data
- TheCommandData
which 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.
-