Interface InteractionCommand

All Known Implementing Classes:
ExecuteCommand, InteractionCommandImpl, ListCommand, MessageCommand

public interface InteractionCommand
Represents a command to be registered with the Discord client.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the list of arguments registered to this command.
    Gets the brief description of the command as it appears in Discord.
    Gets the name of this command as it appears in Discord.
    boolean
    Whether or not the command has been disabled and should not be registered at the request of the user.
    boolean
    Whether or not the command is ephemeral and if its usage/replies should be private for the user on in Discord client.
    void
    Called when an interaction command is received from Discord.
  • Method Details

    • isDisabled

      boolean isDisabled()
      Whether or not the command has been disabled and should not be registered at the request of the user.
      Returns:
      true if the command has been disabled.
    • isEphemeral

      boolean isEphemeral()
      Whether or not the command is ephemeral and if its usage/replies should be private for the user on in Discord client.
      Returns:
      true if the command is ephemeral.
    • getName

      String getName()
      Gets the name of this command as it appears in Discord.
      Returns:
      the name of the command.
    • getDescription

      String getDescription()
      Gets the brief description of the command as it appears in Discord.
      Returns:
      the description of the command.
    • getArguments

      Gets the list of arguments registered to this command.

      Note: Arguments can only be registered before the command itself is registered, others will be ignored.

      Returns:
      the list of arguments.
    • onCommand

      void onCommand(InteractionEvent event)
      Called when an interaction command is received from Discord.
      Parameters:
      event - The InteractionEvent which caused this command to be executed.