Fixed commandhandler error

This commit is contained in:
Kwoth 2017-01-02 14:31:01 +01:00
parent 255f4e62fc
commit 4f771873fc

View File

@ -64,6 +64,9 @@ namespace NadekoBot.Services
private async void MessageReceivedHandler(SocketMessage msg)
{
try
{
var usrMsg = msg as SocketUserMessage;
if (usrMsg == null)
return;
@ -145,9 +148,6 @@ namespace NadekoBot.Services
var sw = new Stopwatch();
sw.Start();
try
{
var exec = await ExecuteCommand(new CommandContext(_client.MainClient, usrMsg), messageContent, DependencyMap.Empty, MultiMatchHandling.Best);
var command = exec.CommandInfo;
var permCache = exec.PermissionCache;