Class BaseApplicationCommand<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>
xyz.dynxsty.dih4jda.interactions.commands.application.BaseApplicationCommand<E,T>
- Type Parameters:
E- The event this class uses.T- The type ofCommandDatathis class uses.
- All Implemented Interfaces:
ExecutableCommand<E>
- Direct Known Subclasses:
ContextCommand,SlashCommand
public abstract class BaseApplicationCommand<E extends net.dv8tion.jda.api.events.interaction.command.GenericCommandInteractionEvent,T>
extends ApplicationCommand<E,T>
An extension of
ApplicationCommand which contains a RegistrationType and queueableGuilds.
This abstract class is meant for top-level commands, which can be queued either per-guild or globally.-
Nested Class Summary
Nested classes/interfaces inherited from class xyz.dynxsty.dih4jda.interactions.commands.RestrictedCommand
RestrictedCommand.Cooldown -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLong[]Gets all the guilds that the command should be registered/queued in.final RegistrationTypeTheRegistrationTypethe command got assigned.voidsetQueueableGuilds(Long... queueableGuilds) Limits this command to only be queued in the specified guilds.final voidHow the command should be queued.Methods inherited from class xyz.dynxsty.dih4jda.interactions.commands.application.ApplicationCommand
getCommandData, setCommandDataMethods 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
-
BaseApplicationCommand
public BaseApplicationCommand()Creates a defaultBaseApplicationCommand.
-
-
Method Details
-
getRegistrationType
TheRegistrationTypethe command got assigned.- Returns:
- the
RegistrationType.
-
setRegistrationType
How the command should be queued. This DOES NOT work withSlashCommand.Subcommand!- Parameters:
type- theRegistrationTypeto set.
-
setQueueableGuilds
Limits this command to only be queued in the specified guilds. Leave this blank (or null) if the command should be queued everywhere.- Parameters:
queueableGuilds- The guild ids, as aLongarray.
-
getQueueableGuilds
Gets all the guilds that the command should be registered/queued in.- Returns:
- the guild ids as an array of
Longs.
-