Interface SlashCommand

All Superinterfaces:
ICommand

public interface SlashCommand extends ICommand
A SlashCommand is represented by a slash ('/'). They can have displayed subcommands and more options.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event)
    This code block will be executed on the command execution.
    default net.dv8tion.jda.api.interactions.commands.build.CommandData
    Gets the command CommandData.
    Gets the command description.

    Methods inherited from interface com.yosoyvillaa.vjcommands.command.ICommand

    getName
  • Method Details

    • getDescription

      String getDescription()
      Gets the command description.
      Returns:
      the command description
    • execute

      void execute(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event)
      This code block will be executed on the command execution.
      Parameters:
      event - Event given by the Discord API
    • getCommandData

      default net.dv8tion.jda.api.interactions.commands.build.CommandData getCommandData()
      Gets the command CommandData. This can contain subcommands, options, and more things.
      Returns:
      the given CommandData (empty by default)