Table of Contents

Class CommandsExtension

Namespace
DSharpPlus.Commands
Assembly
DSharpPlus.Commands.dll

An all in one extension for managing commands.

public sealed class CommandsExtension : BaseExtension
Inheritance
CommandsExtension
Inherited Members

Properties

Checks
CommandExecutor
Commands

The registered commands that the users can execute.

DebugGuildId

The guild id to use for debugging. Leave as 0 to disable.

ParameterChecks
Processors

All registered command processors.

RegisterDefaultCommandProcessors

Whether to register default command processors when they're not found in the processor list.

ServiceProvider

The service provider to use for dependency injection.

UseDefaultCommandErrorHandler

Whether to enable the default command error handler.

Methods

AddCheck(Type)

Adds a new check to the extension.

AddCheck<T>()

Adds a new check to the extension.

AddChecks(Assembly)

Adds all public checks from the provided assembly to the extension.

AddCommand(CommandBuilder)
AddCommand(Delegate)
AddCommand(Delegate, params ulong[])
AddCommand(Type)
AddCommand(Type, params ulong[])
AddCommands(params CommandBuilder[])
AddCommands(IEnumerable<CommandBuilder>)
AddCommands(IEnumerable<Type>)
AddCommands(IEnumerable<Type>, params ulong[])
AddCommands(Assembly)
AddCommands(Assembly, params ulong[])
AddCommands(Type)
AddCommands(Type, params ulong[])
AddCommands<T>()
AddCommands<T>(params ulong[])
AddParameterCheck(Type)

Adds a new check to the extension.

AddParameterCheck<T>()

Adds a new check to the extension.

AddParameterChecks(Assembly)

Adds all parameter checks from the provided assembly to the extension.

AddProcessorAsync(ICommandProcessor)
AddProcessorsAsync(params ICommandProcessor[])
AddProcessorsAsync(IEnumerable<ICommandProcessor>)
Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetCommandsForProcessor<TProcessor>()

Gets a list of commands filtered for a specific command processor

GetProcessor<TProcessor>()
RefreshAsync()
Setup(DiscordClient)

Sets up the extension to use the specified DiscordClient.

Events

CommandErrored

Executed everytime a command has errored.

CommandExecuted

Executed everytime a command is finished executing.