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