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
IServiceCollectionThe 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
CommandsConfigurationThe configuration to use for the extension.
Returns
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
IServiceCollectionThe 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>