Interface IAutocompleteHandler
- Namespace
- Discord.Interactions
- Assembly
- Discord.Net.Interactions.dll
Represent a Autocomplete handler object that can be executed to generate parameter suggestions.
public interface IAutocompleteHandlerProperties
InteractionService
Gets the the underlying command service.
InteractionService InteractionService { get; }Property Value
Methods
ExecuteAsync(IInteractionContext, IAutocompleteInteraction, IParameterInfo, IServiceProvider)
Executes the IAutocompleteHandler with the provided context.
Task<IResult> ExecuteAsync(IInteractionContext context, IAutocompleteInteraction autocompleteInteraction, IParameterInfo parameter, IServiceProvider services)Parameters
- contextIInteractionContext
- The execution context. 
- autocompleteInteractionIAutocompleteInteraction
- AutocompleteInteraction payload. 
- parameterIParameterInfo
- Parameter information of the target parameter. 
- servicesIServiceProvider
- Dependencies that will be used to create the module instance. 
Returns
- Task<IResult>
- A task representing the execution process. The task result contains the execution result. 
GenerateSuggestionsAsync(IInteractionContext, IAutocompleteInteraction, IParameterInfo, IServiceProvider)
Will be used to generate parameter suggestions.
Task<AutocompletionResult> GenerateSuggestionsAsync(IInteractionContext context, IAutocompleteInteraction autocompleteInteraction, IParameterInfo parameter, IServiceProvider services)Parameters
- contextIInteractionContext
- Command execution context. 
- autocompleteInteractionIAutocompleteInteraction
- Autocomplete Interaction payload. 
- parameterIParameterInfo
- Parameter information of the target parameter. 
- servicesIServiceProvider
- Dependencies that will be used to create the module instance. 
Returns
- Task<AutocompletionResult>
- A task representing the execution process. The task result contains the Autocompletion result.