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 of CommandData 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.
  • Constructor Details

  • Method Details

    • setCommandData

      public final void setCommandData(@Nonnull T data)
      Sets this commands' CommandData.
      Parameters:
      data - The CommandData which should be used for this application command.
    • getCommandData

      @Nonnull public final T getCommandData()
      Gets the command data that was previously set with setCommandData(Object)
      Returns:
      the command data object.
      Throws:
      IllegalArgumentException - if data is null.