Annotation Interface CommandInfo


@Target(TYPE) @Retention(RUNTIME) public @interface CommandInfo
Annotation for defining text command metadata on handler classes.

Note: For new plugins, prefer the @TextCommand annotation directly on methods in your @Plugin class, which combines metadata and handler registration in one step:

@TextCommand(name = "greet", description = "Greet someone",
        usage = "greet <user>", aliases = {"hi", "hello"})
public void greet(CommandContext context) {
    context.reply("Hello!");
}

This annotation is still useful when implementing TextCommandHandler as a standalone class for programmatic registration.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The command name.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The command aliases.
    The command description.
    net.dv8tion.jda.api.Permission[]
    The command permissions required.
    The command usage.
  • Element Details

    • name

      String name
      The command name.
      Returns:
      the command name
    • description

      String description
      The command description.
      Returns:
      the command description
      Default:
      ""
    • usage

      String usage
      The command usage.
      Returns:
      the command usage
      Default:
      ""
    • aliases

      String[] aliases
      The command aliases.
      Returns:
      the command aliases
      Default:
      {}
    • permissions

      net.dv8tion.jda.api.Permission[] permissions
      The command permissions required. Uses JDA Permission enum for type safety and IDE autocomplete.
      Returns:
      required permissions
      Default:
      {}