Search Results for

    Show / Hide Table of Contents

    Class AutocompleteHandler

    Base class for creating Autocompleters. InteractionService uses Autocompleters to generate parameter suggestions.

    Inheritance
    Object
    AutocompleteHandler
    Implements
    IAutocompleteHandler
    Namespace: Discord.Interactions
    Assembly: Discord.Net.Interactions.dll
    Syntax
    public abstract class AutocompleteHandler : object, IAutocompleteHandler

    Properties

    | Improve this Doc View Source

    InteractionService

    Gets the the underlying command service.

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

    Methods

    | Improve this Doc View Source

    ExecuteAsync(IInteractionContext, IAutocompleteInteraction, IParameterInfo, IServiceProvider)

    Executes the IAutocompleteHandler with the provided context.

    Declaration
    public async 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
    public abstract 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.

    | Improve this Doc View Source

    GetLogString(IInteractionContext)

    Declaration
    protected virtual string GetLogString(IInteractionContext context)
    Parameters
    Type Name Description
    IInteractionContext context
    Returns
    Type Description
    String

    Implements

    IAutocompleteHandler

    Theme

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