|
|
@@ -165,11 +165,11 @@ namespace Discord.Commands |
|
|
|
switch (RunMode) |
|
|
|
{ |
|
|
|
case RunMode.Sync: //Always sync |
|
|
|
return await ExecuteAsyncInternalAsync(context, args, services).ConfigureAwait(false); |
|
|
|
return await ExecuteInternalAsync(context, args, services).ConfigureAwait(false); |
|
|
|
case RunMode.Async: //Always async |
|
|
|
var t2 = Task.Run(async () => |
|
|
|
{ |
|
|
|
await ExecuteAsyncInternalAsync(context, args, services).ConfigureAwait(false); |
|
|
|
await ExecuteInternalAsync(context, args, services).ConfigureAwait(false); |
|
|
|
}); |
|
|
|
break; |
|
|
|
} |
|
|
@@ -181,7 +181,7 @@ namespace Discord.Commands |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private async Task<IResult> ExecuteAsyncInternalAsync(ICommandContext context, object[] args, IServiceProvider services) |
|
|
|
private async Task<IResult> ExecuteInternalAsync(ICommandContext context, object[] args, IServiceProvider services) |
|
|
|
{ |
|
|
|
await Module.Service._cmdLogger.DebugAsync($"Executing {GetLogText(context)}").ConfigureAwait(false); |
|
|
|
try |
|
|
|