Functionseedcordv0.15.0Decorator
AutocompleteRoute
Routes one or more commands' autocomplete to an AutocompleteHandlerAutocompleteHandler.
Pass the same command route string(s) as the handler's generic. One command branches with this.matchthis.match over its autocompletable fields, several commands share one handler whose arms span every command's fields. The decorator routes and the generic must match exactly, so listing fewer or more than the handler declares is a compile error.
AutocompleteRoute<Route>(
routes: Route[]
): <
TCtor extends new (
...args: any[]
) => BaseHandler<AutocompleteInteraction<CacheType>>
>(
constructor: AssertAutocompleteRoute<Route, TCtor>
) => voidAutocompleteRoute<Route>(
routes: Route[]
): <
TCtor extends new (
...args: any[]
) => BaseHandler<AutocompleteInteraction<CacheType>>
>(
constructor: AssertAutocompleteRoute<Route, TCtor>
) => voidRoute
RouteRouteroutes
routes: Route[]routes: Route[]The command route string(s) this handler serves, e.g. 'search''search' or 'search', 'find''search', 'find'.