interface AutoCompleteOptions<T> {
    choices?: APIApplicationCommandOptionChoice<string>[];
    description: string;
    lowercaseQuery?: boolean;
    maxLength?: number;
    minLength?: number;
    name: string;
    required?: boolean;
    resolveValue?: T extends undefined
        ? undefined
        : AutoCompleteGetValueFunction<T>;
    run: AutoCompleteRunFunction;
    suppressUnknownInteractionErrors?: boolean;
    trimQuery?: boolean;
}

Type Parameters

  • T = undefined

Properties

choices?: APIApplicationCommandOptionChoice<string>[]

The choices for this auto-complete option.

description: string

The description for this auto-complete option.

lowercaseQuery?: boolean

Should the query be lowercased before being passed to the run function?

maxLength?: number

The maximum length for the auto-complete option.

minLength?: number

The minimum length for the auto-complete option.

name: string

The name for this auto-complete option, this should be unique.

required?: boolean

Whether this auto-complete option is required.

resolveValue?: T extends undefined
    ? undefined
    : AutoCompleteGetValueFunction<T>

The function that gets the resolved value of the auto-complete option. Returns raw value by default.

The function that responds to the auto-complete option.

suppressUnknownInteractionErrors?: boolean

Should warnings about Unknown Interaction errors be suppressed?

trimQuery?: boolean

Should the query be trimmed before being passed to the run function?