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
This commit is contained in:
committed by
Christopher F
parent
cdf60d5c99
commit
552f34c30e
@@ -21,7 +21,6 @@ namespace _02_commands_framework.Services
|
|||||||
_services = services;
|
_services = services;
|
||||||
|
|
||||||
_commands.CommandExecuted += CommandExecutedAsync;
|
_commands.CommandExecuted += CommandExecutedAsync;
|
||||||
_commands.Log += LogAsync;
|
|
||||||
_discord.MessageReceived += MessageReceivedAsync;
|
_discord.MessageReceived += MessageReceivedAsync;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,12 +56,5 @@ namespace _02_commands_framework.Services
|
|||||||
// the command failed, let's notify the user that something happened.
|
// the command failed, let's notify the user that something happened.
|
||||||
await context.Channel.SendMessageAsync($"error: {result.ToString()}");
|
await context.Channel.SendMessageAsync($"error: {result.ToString()}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task LogAsync(LogMessage log)
|
|
||||||
{
|
|
||||||
Console.WriteLine(log.ToString());
|
|
||||||
|
|
||||||
return Task.CompletedTask;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user