Skip to content

Commit

Permalink
Fixes Azure linux build failing due to a CS8652.
Browse files Browse the repository at this point in the history
  • Loading branch information
alikindsys committed Nov 27, 2020
1 parent c455b50 commit 56d1639
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Discord.Net.Commands/CommandService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -514,17 +514,17 @@ public async Task<IResult> ExecuteAsync(ICommandContext context, string input, I
{
await _commandExecutedEvent.InvokeAsync(Optional.Create<CommandInfo>(), context, searchResult).ConfigureAwait(false);
}
else if(validationResult is not ParseResult parseResult)
{
await _commandExecutedEvent.InvokeAsync(commandMatch.Value.Command,context,validationResult).ConfigureAwait(false);
}
else
else if(validationResult is ParseResult parseResult)
{
var result = await commandMatch.Value.Command.ExecuteAsync(context, parseResult, services).ConfigureAwait(false);
if (!result.IsSuccess && !(result is RuntimeResult || result is ExecuteResult)) // succesful results raise the event in CommandInfo#ExecuteInternalAsync (have to raise it there b/c deffered execution)
await _commandExecutedEvent.InvokeAsync(commandMatch.Value.Command, context, result);
return result;
}
else
{
await _commandExecutedEvent.InvokeAsync(commandMatch.Value.Command, context, validationResult).ConfigureAwait(false);
}
return validationResult;
}

Expand Down

0 comments on commit 56d1639

Please sign in to comment.