Annotation Interface AutoComplete
Methods annotated with AutoComplete will be registered as a handler for AutoCompleteEvent
s for the given
SlashCommand.
Example:
@SlashCommand(value = "favourite fruit")
public void fruitCommand(CommandEvent event, String fruit) {
event.reply("You've chosen: %s", fruit);
}
@AutoComplete("fruitCommand")
public void onFruitAutoComplete(AutoCompleteEvent event) {
event.replyChoices(...);
}
- See Also:
-
Required Element Summary
-
Element Details
-
value
String[] valueReturns the name of the slash commands this autocomplete should handle.- Returns:
- the slash commands
-