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
TContextThe context the invoked application commands use.
TAutocompleteContextThe context the invoked autocomplete interactions use.
- Inheritance
-
ApplicationCommandService<TContext>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
configurationApplicationCommandServiceConfiguration<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
contextTAutocompleteContextThe autocomplete interaction context.
serviceProviderIServiceProviderThe service provider for dependency injection.
Returns
- ValueTask<IExecutionResult>
A task representing the execution result.