Method UseSlashCommandsAsync
- Namespace
- DSharpPlus.SlashCommands
- Assembly
- DSharpPlus.SlashCommands.dll
UseSlashCommandsAsync(DiscordShardedClient, SlashCommandsConfiguration)
Enables slash commands on this DiscordShardedClient.
[Obsolete("DSharpPlus.SlashCommands is obsolete. Please consider using the new DSharpPlus.Commands extension instead.")]
public static Task<IReadOnlyDictionary<int, SlashCommandsExtension>> UseSlashCommandsAsync(this DiscordShardedClient client, SlashCommandsConfiguration config = null)
Parameters
client
DiscordShardedClientClient to enable slash commands on.
config
SlashCommandsConfigurationConfiguration to use.
Returns
- Task<IReadOnlyDictionary<int, SlashCommandsExtension>>
A dictionary of created SlashCommandsExtension with the key being the shard id.