diff --git a/docs/guides/commands/samples/command_handler.cs b/docs/guides/commands/samples/command_handler.cs index 470be2707..d63d550ee 100644 --- a/docs/guides/commands/samples/command_handler.cs +++ b/docs/guides/commands/samples/command_handler.cs @@ -1,12 +1,14 @@ -public class CommandHandle +public class CommandHandler { private readonly DiscordSocketClient _client; private readonly CommandService _commands; + private readonly IServiceProvider _services; - public CommandHandle(DiscordSocketClient client) + public CommandHandler(IServiceProvider services) { - _client = client; - _commands = new CommandService(); + _services = services; + _commands = services.GetRequiredService(); + _client = services.GetRequiredService(); } public async Task InstallCommandsAsync()