Fix changes after review

This commit is contained in:
FiniteReality
2016-11-25 20:22:06 +00:00
parent 254e874c99
commit 704b2b75f4
4 changed files with 64 additions and 70 deletions

View File

@@ -135,26 +135,17 @@ namespace Discord.Commands
if (map == null)
map = DependencyMap.Empty;
object[] args = null;
try
{
args = GenerateArgs(argList, paramList);
}
catch (Exception ex)
{
return ExecuteResult.FromError(ex);
}
object[] args = GenerateArgs(argList, paramList);
foreach (var parameter in Parameters)
{
var result = await parameter.CheckPreconditionsAsync(context, args, map).ConfigureAwait(false);
if (!result.IsSuccess)
return ExecuteResult.FromError(result);
}
foreach (var parameter in Parameters)
{
var result = await parameter.CheckPreconditionsAsync(context, args, map).ConfigureAwait(false);
if (!result.IsSuccess)
return ExecuteResult.FromError(result);
}
try
{
switch (RunMode)
{
case RunMode.Sync: //Always sync