fix: CommandExecuted event will fire when a parameter precondition fails like what happens when standard precondition fails. (#1346)

This commit is contained in:
advorange
2019-08-25 06:22:30 -07:00
committed by Christopher F
parent 265da99619
commit e8cb031704

View File

@@ -213,7 +213,10 @@ namespace Discord.Commands
object argument = args[position];
var result = await parameter.CheckPreconditionsAsync(context, argument, services).ConfigureAwait(false);
if (!result.IsSuccess)
{
await Module.Service._commandExecutedEvent.InvokeAsync(this, context, result).ConfigureAwait(false);
return ExecuteResult.FromError(result);
}
}
switch (RunMode)