Annotation 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 -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionString[]The command aliases.The command description.net.dv8tion.jda.api.Permission[]The command permissions required.The command usage.
-
Element Details
-
name
-
description
-
usage
-
aliases
-
permissions
net.dv8tion.jda.api.Permission[] permissionsThe command permissions required. Uses JDA Permission enum for type safety and IDE autocomplete.- Returns:
- required permissions
- Default:
{}
-