Browse Source

Cleaned up and refactored slightly

tags/2.0
HelpfulStranger999 Christopher F 7 years ago
parent
commit
c67db88961
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/Discord.Net.Commands/Info/CommandInfo.cs

+ 3
- 3
src/Discord.Net.Commands/Info/CommandInfo.cs View File

@@ -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


Loading…
Cancel
Save