Annotation Type Alias
-
@Retention(RUNTIME) @Target(TYPE) @Repeatable(Aliases.class) @Documented public @interface Alias
An annotation with which one or more aliases for a command can be configured. If at least one alias is configured, only the explicitly configured ones are available. If no alias is configured, the class name, stripped byCommand
orCmd
suffix and / or prefix if present and the first letter lowercased is used as default.When injecting a
List<SlashCommandBuilder>
anywhere, all aliases of commands implementingSlashCommandJavacord
have to follow a pre-defined format that is described atSlashCommandJavacord
.Alternatively to using this annotation the
Command.getAliases()
method can be overwritten. If that method is overwritten and this annotation is used, the method overwrite takes precedence. That method is also what should be used to retrieve the configured aliases.- See Also:
Command.getAliases()
-
-
Element Detail
-
value
String value
Returns the alias for the annotated command.- Returns:
- the alias for the annotated command
-
-