fix: CommandExecuted event will fire when a parameter precondition fails like what happens when standard precondition fails. (#1346)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user