Browse Source

Move CommandExecuted invoking up a scope for generic Task commands

Resovles #870
tags/2.0.0-beta
Christopher F 7 years ago
parent
commit
8d533930fa
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/Discord.Net.Commands/Info/CommandInfo.cs

+ 4
- 1
src/Discord.Net.Commands/Info/CommandInfo.cs View File

@@ -199,10 +199,13 @@ namespace Discord.Commands
return result; return result;
} }
else else
{
await task.ConfigureAwait(false); await task.ConfigureAwait(false);
var result = ExecuteResult.FromSuccess();
await Module.Service._commandExecutedEvent.InvokeAsync(this, context, result).ConfigureAwait(false);
}


var executeResult = ExecuteResult.FromSuccess(); var executeResult = ExecuteResult.FromSuccess();
await Module.Service._commandExecutedEvent.InvokeAsync(this, context, executeResult).ConfigureAwait(false);
return executeResult; return executeResult;
} }
catch (Exception ex) catch (Exception ex)


Loading…
Cancel
Save