Interface ISlashCommand


public interface ISlashCommand
  • Method Summary

    Modifier and Type
    Method
    Description
    net.dv8tion.jda.api.interactions.commands.build.CommandData
    Builds CommandData for the SlashCommand upsert.
    Gets the name for the Command.
    void
    onAutoComplete(net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent event)
    This body is executed when an auto-complete event is received.
    void
    Runs checks for the SlashCommand with the given SlashCommandEvent that called it.
  • Method Details

    • run

      void run(SlashCommandEvent event)
      Runs checks for the SlashCommand with the given SlashCommandEvent that called it.
      Will terminate, and possibly respond with a failure message, if any checks fail.
      Parameters:
      event - The SlashCommandEvent that triggered this Command
    • onAutoComplete

      void onAutoComplete(net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent event)
      This body is executed when an auto-complete event is received. This only ever gets executed if an auto-complete option is set.
      Parameters:
      event - The event to handle.
      See Also:
      • OptionData.setAutoComplete(boolean)
    • buildCommandData

      net.dv8tion.jda.api.interactions.commands.build.CommandData buildCommandData()
      Builds CommandData for the SlashCommand upsert. This code is executed when we need to upsert the command.
      Returns:
      the built command data
    • getName

      String getName()
      Gets the name for the Command.
      Returns:
      The name for the Command