Log command usage

This commit is contained in:
Runebaas 2018-02-13 23:42:31 +01:00
parent d750513bc8
commit 03ed80d3d4
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6

View file

@ -56,6 +56,9 @@ namespace Geekbot.net
message.HasMentionPrefix(_client.CurrentUser, ref argPos))) return Task.CompletedTask; message.HasMentionPrefix(_client.CurrentUser, ref argPos))) return Task.CompletedTask;
var context = new CommandContext(_client, message); var context = new CommandContext(_client, message);
var commandExec = _commands.ExecuteAsync(context, argPos, _servicesProvider); var commandExec = _commands.ExecuteAsync(context, argPos, _servicesProvider);
_logger.Information("Command",
context.Message.Content.Split(" ")[0].Replace("!", ""),
SimpleConextConverter.ConvertContext(context));
return Task.CompletedTask; return Task.CompletedTask;
} }
catch (Exception e) catch (Exception e)