Class ApplicationCommandService<TContext>
- Namespace
- NetCord.Services.ApplicationCommands
- Assembly
- NetCord.Services.dll
public class ApplicationCommandService<TContext> : IApplicationCommandService, IService where TContext : IApplicationCommandContext
Type Parameters
TContext
- Inheritance
-
ApplicationCommandService<TContext>
- Implements
-
- Derived
-
- Inherited Members
-
Constructors
ApplicationCommandService(ApplicationCommandServiceConfiguration<TContext>?)
public ApplicationCommandService(ApplicationCommandServiceConfiguration<TContext>? configuration = null)
Parameters
configuration
ApplicationCommandServiceConfiguration<TContext>
Properties
Configuration
public ApplicationCommandServiceConfiguration<TContext> Configuration { get; }
Property Value
- ApplicationCommandServiceConfiguration<TContext>
Methods
AddEntryPointCommand(EntryPointCommandBuilder)
public void AddEntryPointCommand(EntryPointCommandBuilder builder)
Parameters
builder
EntryPointCommandBuilder
AddMessageCommand(MessageCommandBuilder)
public void AddMessageCommand(MessageCommandBuilder builder)
Parameters
builder
MessageCommandBuilder
AddModule(Type)
public void AddModule(Type type)
Parameters
type
Type
AddModule<T>()
public void AddModule<T>()
Type Parameters
T
AddModules(Assembly)
public void AddModules(Assembly assembly)
Parameters
assembly
Assembly
AddSlashCommand(SlashCommandBuilder)
public void AddSlashCommand(SlashCommandBuilder builder)
Parameters
builder
SlashCommandBuilder
AddSlashCommandGroup(SlashCommandGroupBuilder)
public void AddSlashCommandGroup(SlashCommandGroupBuilder builder)
Parameters
builder
SlashCommandGroupBuilder
AddUserCommand(UserCommandBuilder)
public void AddUserCommand(UserCommandBuilder builder)
Parameters
builder
UserCommandBuilder
ExecuteAsync(TContext, IServiceProvider?)
public ValueTask<IExecutionResult> ExecuteAsync(TContext context, IServiceProvider? serviceProvider = null)
Parameters
context
TContext
serviceProvider
IServiceProvider
Returns
- ValueTask<IExecutionResult>
GetCommands()
public IReadOnlyList<ApplicationCommandInfo<TContext>> GetCommands()
Returns
- IReadOnlyList<ApplicationCommandInfo<TContext>>
RegisterCommandsAsync(RestClient, ulong, ulong?, RestRequestProperties?, CancellationToken)
public Task<IReadOnlyList<ApplicationCommand>> RegisterCommandsAsync(RestClient client, ulong applicationId, ulong? guildId = null, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
client
RestClient
applicationId
ulong
guildId
ulong?
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task<IReadOnlyList<ApplicationCommand>>