Annotation Interface Command


@ReleasedSince("26.8.301") @Target(TYPE) @Retention(RUNTIME) public @interface Command
Marks a class as a top-level Discord Slash Command.

Classes annotated with @Command serve as the entry point for command registration in the Tori framework. A command class can either directly define options and an Execute handler, or contain nested static classes annotated with Subcommand or SubcommandGroup.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    A brief description explaining what the command does (1-100 characters).
    The name of the slash command.
  • Element Details

    • name

      String name
      The name of the slash command. Must be lowercase and match Discord's command naming rules (1-32 characters, no spaces).
      Returns:
      the command name
    • description

      String description
      A brief description explaining what the command does (1-100 characters).
      Returns:
      the command description