Class CommandService<TContext>
- Namespace
- NetCord.Services.Commands
- Assembly
- NetCord.Services.dll
public class CommandService<TContext> : ICommandService, IService where TContext : ICommandContext
Type Parameters
TContext
- Inheritance
-
CommandService<TContext>
- Implements
-
- Inherited Members
-
Constructors
CommandService(CommandServiceConfiguration<TContext>?)
public CommandService(CommandServiceConfiguration<TContext>? configuration = null)
Parameters
configuration
CommandServiceConfiguration<TContext>
Methods
AddCommand(IEnumerable<string>, Delegate, int)
public void AddCommand(IEnumerable<string> aliases, Delegate handler, int priority = 0)
Parameters
aliases
IEnumerable<string>
handler
Delegate
priority
int
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
ExecuteAsync(int, TContext, IServiceProvider?)
public ValueTask<IExecutionResult> ExecuteAsync(int prefixLength, TContext context, IServiceProvider? serviceProvider = null)
Parameters
prefixLength
int
context
TContext
serviceProvider
IServiceProvider
Returns
- ValueTask<IExecutionResult>
GetCommands()
public IReadOnlyDictionary<ReadOnlyMemory<char>, IReadOnlyList<CommandInfo<TContext>>> GetCommands()
Returns
- IReadOnlyDictionary<ReadOnlyMemory<char>, IReadOnlyList<CommandInfo<TContext>>>