replace duplicate InvokeAndReturn wit return statement (#2662)

This commit is contained in:
Cenk Ergen
2023-04-12 09:14:10 +03:00
committed by GitHub
parent 75ae48830e
commit fe9657a0ee

View File

@@ -92,7 +92,7 @@ namespace Discord.Interactions
var result = await ParseArgumentAsync(parameter, context, options, services).ConfigureAwait(false); var result = await ParseArgumentAsync(parameter, context, options, services).ConfigureAwait(false);
if (!result.IsSuccess) if (!result.IsSuccess)
return await InvokeEventAndReturn(context, ParseResult.FromError(result)).ConfigureAwait(false); return ParseResult.FromError(result);
if (result is not TypeConverterResult converterResult) if (result is not TypeConverterResult converterResult)
return ExecuteResult.FromError(InteractionCommandError.BadArgs, "Complex command parsing failed for an unknown reason."); return ExecuteResult.FromError(InteractionCommandError.BadArgs, "Complex command parsing failed for an unknown reason.");