Table of Contents

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>

Properties

Configuration

public CommandServiceConfiguration<TContext> Configuration { get; }

Property Value

CommandServiceConfiguration<TContext>

Methods

AddCommand(CommandBuilder)

public void AddCommand(CommandBuilder builder)

Parameters

builder CommandBuilder

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>>>