Search Results for

    Show / Hide Table of Contents

    Interface IAutocompleteHandler

    Represent a Autocomplete handler object that can be executed to generate parameter suggestions.

    Namespace: Discord.Interactions
    Assembly: Discord.Net.Interactions.dll
    Syntax
    public interface IAutocompleteHandler

    Properties

    | Improve this Doc View Source

    InteractionService

    Gets the the underlying command service.

    Declaration
    InteractionService InteractionService { get; }
    Property Value
    Type Description
    InteractionService

    Methods

    | Improve this Doc View Source

    ExecuteAsync(IInteractionContext, IAutocompleteInteraction, IParameterInfo, IServiceProvider)

    Executes the IAutocompleteHandler with the provided context.

    Declaration
    Task<IResult> ExecuteAsync(IInteractionContext context, IAutocompleteInteraction autocompleteInteraction, IParameterInfo parameter, IServiceProvider services)
    Parameters
    Type Name Description
    IInteractionContext context

    The execution context.

    IAutocompleteInteraction autocompleteInteraction

    AutocompleteInteraction payload.

    IParameterInfo parameter

    Parameter information of the target parameter.

    IServiceProvider services

    Dependencies that will be used to create the module instance.

    Returns
    Type Description
    Task<IResult>

    A task representing the execution process. The task result contains the execution result.

    | Improve this Doc View Source

    GenerateSuggestionsAsync(IInteractionContext, IAutocompleteInteraction, IParameterInfo, IServiceProvider)

    Will be used to generate parameter suggestions.

    Declaration
    Task<AutocompletionResult> GenerateSuggestionsAsync(IInteractionContext context, IAutocompleteInteraction autocompleteInteraction, IParameterInfo parameter, IServiceProvider services)
    Parameters
    Type Name Description
    IInteractionContext context

    Command execution context.

    IAutocompleteInteraction autocompleteInteraction

    Autocomplete Interaction payload.

    IParameterInfo parameter

    Parameter information of the target parameter.

    IServiceProvider services

    Dependencies that will be used to create the module instance.

    Returns
    Type Description
    Task<AutocompletionResult>

    A task representing the execution process. The task result contains the Autocompletion result.

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2023 3.12.0