Browse Source

Fixed CommandExecuted firing twice for failed RuntimeResults

pull/1192/head
Casino Boyale 6 years ago
parent
commit
a491bd3a67
1 changed files with 0 additions and 2 deletions
  1. +0
    -2
      src/Discord.Net.Commands/CommandService.cs

+ 0
- 2
src/Discord.Net.Commands/CommandService.cs View File

@@ -603,8 +603,6 @@ namespace Discord.Commands
//If we get this far, at least one parse was successful. Execute the most likely overload.
var chosenOverload = successfulParses[0];
var result = await chosenOverload.Key.ExecuteAsync(context, chosenOverload.Value, services).ConfigureAwait(false);
if (!result.IsSuccess) // succesful results raise the event in CommandInfo#ExecuteInternalAsync (have to raise it there b/c deffered execution)
await _commandExecutedEvent.InvokeAsync(chosenOverload.Key.Command, context, result);
return result;
}
}


Loading…
Cancel
Save