Table of Contents

Method AddCommandsExtension

Namespace
DSharpPlus.Commands
Assembly
DSharpPlus.Commands.dll

AddCommandsExtension(IServiceCollection, Action<IServiceProvider, CommandsExtension>, CommandsConfiguration?)

Registers the commands extension with an IServiceCollection.

public static IServiceCollection AddCommandsExtension(this IServiceCollection services, Action<IServiceProvider, CommandsExtension> setup, CommandsConfiguration? configuration = null)

Parameters

services IServiceCollection

The service collection to register the extension with.

setup Action<IServiceProvider, CommandsExtension>

Any setup code you want to run on the extension, such as registering commands and converters.

configuration CommandsConfiguration

The configuration to use for the extension.

Returns

IServiceCollection

AddCommandsExtension(IServiceCollection, Action<IServiceProvider, CommandsExtension>, Func<IServiceProvider, CommandsConfiguration>)

Registers the commands extension with an IServiceCollection.

public static IServiceCollection AddCommandsExtension(this IServiceCollection services, Action<IServiceProvider, CommandsExtension> setup, Func<IServiceProvider, CommandsConfiguration> configurationFactory)

Parameters

services IServiceCollection

The service collection to register the extension with.

setup Action<IServiceProvider, CommandsExtension>

Any setup code you want to run on the extension, such as registering commands and converters.

configurationFactory Func<IServiceProvider, CommandsConfiguration>

Returns

IServiceCollection