From 56d16397f7da77df31b6e1e2a1fd1a318c081cfd Mon Sep 17 00:00:00 2001 From: roridev Date: Fri, 27 Nov 2020 18:42:23 -0300 Subject: [PATCH] Fixes Azure linux build failing due to a CS8652. --- src/Discord.Net.Commands/CommandService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Discord.Net.Commands/CommandService.cs b/src/Discord.Net.Commands/CommandService.cs index 6fbf0a9bd..f54072811 100644 --- a/src/Discord.Net.Commands/CommandService.cs +++ b/src/Discord.Net.Commands/CommandService.cs @@ -514,17 +514,17 @@ namespace Discord.Commands { await _commandExecutedEvent.InvokeAsync(Optional.Create(), 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; }