All tools / Commands
Autocomplete response builder
Build a type 8 APPLICATION_COMMAND_AUTOCOMPLETE_RESULT body: filter by what the user typed, cap at 25 choices, and validate values.
Result
25 choices, fast
Autocomplete interactions accept only callback type 8 with up to 25 choices. Choice names are 1–100 characters and string values up to 100. The response still has the 3-second deadline, so filter from a cache rather than calling a slow API on every keystroke.
Related: Interaction response type picker · Slash command JSON validator