From 552f34c30e10477ce7b3513c2f54c6eebd644797 Mon Sep 17 00:00:00 2001 From: Casino Boyale Date: Mon, 31 Dec 2018 17:18:06 +0000 Subject: [PATCH] docs: Removed double hooking of CommandService log event (#1225) * Removed double hooking of CommandService log event The log event is already hooked in Line 38 of program.cs * Removed redundant log method --- .../Services/CommandHandlingService.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/samples/02_commands_framework/Services/CommandHandlingService.cs b/samples/02_commands_framework/Services/CommandHandlingService.cs index ca7af2774..d29be9201 100644 --- a/samples/02_commands_framework/Services/CommandHandlingService.cs +++ b/samples/02_commands_framework/Services/CommandHandlingService.cs @@ -21,7 +21,6 @@ namespace _02_commands_framework.Services _services = services; _commands.CommandExecuted += CommandExecutedAsync; - _commands.Log += LogAsync; _discord.MessageReceived += MessageReceivedAsync; } @@ -57,12 +56,5 @@ namespace _02_commands_framework.Services // the command failed, let's notify the user that something happened. await context.Channel.SendMessageAsync($"error: {result.ToString()}"); } - - private Task LogAsync(LogMessage log) - { - Console.WriteLine(log.ToString()); - - return Task.CompletedTask; - } } }