Annotation Interface AutoComplete


@Target(METHOD) @Retention(RUNTIME) public @interface AutoComplete

Methods annotated with AutoComplete will be registered as a handler for AutoCompleteEvents 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

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the name of the slash commands this autocomplete should handle.
  • Element Details

    • value

      String[] value
      Returns the name of the slash commands this autocomplete should handle.
      Returns:
      the slash commands