Method AddSlashCommandsExtension
- Namespace
- DSharpPlus.SlashCommands
- Assembly
- DSharpPlus.SlashCommands.dll
AddSlashCommandsExtension(IServiceCollection, Action<SlashCommandsExtension>)
Adds the slash commands extension to the provided service collection.
[Obsolete("DSharpPlus.SlashCommands is obsolete. Please consider using the new DSharpPlus.Commands extension instead.")]
public static IServiceCollection AddSlashCommandsExtension(this IServiceCollection services, Action<SlashCommandsExtension> setup)
Parameters
services
IServiceCollectionThe service collection to register into.
setup
Action<SlashCommandsExtension>Any setup code you want to run on the extension, such as registering commands.
Returns
- IServiceCollection
The same service collection for chaining.