Class BaseApplicationCommand<E extends net.dv8tion.jda.api.events.interaction.command.GenericCommandInteractionEvent,T>

Type Parameters:
E - The event this class uses.
T - The type of CommandData this 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.
  • Constructor Details

  • Method Details

    • getRegistrationType

      @Nonnull public final RegistrationType getRegistrationType()
      The RegistrationType the command got assigned.
      Returns:
      the RegistrationType.
    • setRegistrationType

      public final void setRegistrationType(@Nonnull RegistrationType type)
      How the command should be queued. This DOES NOT work with SlashCommand.Subcommand!
      Parameters:
      type - the RegistrationType to set.
    • setQueueableGuilds

      public void setQueueableGuilds(@Nonnull Long... queueableGuilds)
      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 a Long array.
    • getQueueableGuilds

      @Nonnull public Long[] getQueueableGuilds()
      Gets all the guilds that the command should be registered/queued in.
      Returns:
      the guild ids as an array of Longs.