Annotation Interface TextCommand
Marks a class as an annotation-driven legacy text command.
Classes annotated with @TextCommand should extend
ModernBaseTextCommand to be properly
registered and routed by the TextCommandRegistrar.
Note: Due to Discord's strict restrictions on the Message Content Intent, the use of legacy text commands is generally discouraged in favor of Slash Commands.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescription@NotNull StringThe primary name used to trigger this command. -
Optional Element Summary
Optional Elements
-
Element Details
-
commandName
The primary name used to trigger this command.This string should not include the command prefix. For example, if your bot prefix is "!" and you want the command to be "!ping", you should set this value to simply
"ping".- Returns:
- The main command name.
-
aliases
An optional array of alternative names that can also be used to trigger this command.For example, if the primary command name is
"serverinfo", you might provide aliases like{"si", "info"}.- Returns:
- An array of command aliases, or an empty array if no aliases are defined.
- Default:
{}
-