fix: pass the entire Exception into ExecuteResult
This commit is contained in:
@@ -273,7 +273,7 @@ namespace Discord.Commands
|
|||||||
var wrappedEx = new CommandException(this, context, ex);
|
var wrappedEx = new CommandException(this, context, ex);
|
||||||
await Module.Service._cmdLogger.ErrorAsync(wrappedEx).ConfigureAwait(false);
|
await Module.Service._cmdLogger.ErrorAsync(wrappedEx).ConfigureAwait(false);
|
||||||
|
|
||||||
var result = ExecuteResult.FromError(CommandError.Exception, ex.Message);
|
var result = ExecuteResult.FromError(ex);
|
||||||
await Module.Service._commandExecutedEvent.InvokeAsync(this, context, result).ConfigureAwait(false);
|
await Module.Service._commandExecutedEvent.InvokeAsync(this, context, result).ConfigureAwait(false);
|
||||||
|
|
||||||
if (Module.Service._throwOnError)
|
if (Module.Service._throwOnError)
|
||||||
|
|||||||
Reference in New Issue
Block a user