Table of Contents

Class ApplicationCommandService<TContext, TAutocompleteContext>

Namespace
NetCord.Services.ApplicationCommands
Assembly
NetCord.Services.dll

Provides functionality for managing and executing application commands with autocomplete support.

public class ApplicationCommandService<TContext, TAutocompleteContext> : ApplicationCommandService<TContext>, IApplicationCommandService, IService where TContext : IApplicationCommandContext where TAutocompleteContext : IAutocompleteInteractionContext

Type Parameters

TContext

The context the invoked application commands use.

TAutocompleteContext

The context the invoked autocomplete interactions use.

Inheritance
ApplicationCommandService<TContext, TAutocompleteContext>
Implements
Inherited Members

Constructors

ApplicationCommandService(ApplicationCommandServiceConfiguration<TContext>?)

Provides functionality for managing and executing application commands with autocomplete support.

public ApplicationCommandService(ApplicationCommandServiceConfiguration<TContext>? configuration = null)

Parameters

configuration ApplicationCommandServiceConfiguration<TContext>

The configuration for the application command service.

Methods

ExecuteAutocompleteAsync(TAutocompleteContext, IServiceProvider?)

Executes an autocomplete interaction.

public ValueTask<IExecutionResult> ExecuteAutocompleteAsync(TAutocompleteContext context, IServiceProvider? serviceProvider = null)

Parameters

context TAutocompleteContext

The autocomplete interaction context.

serviceProvider IServiceProvider

The service provider for dependency injection.

Returns

ValueTask<IExecutionResult>

A task representing the execution result.