Browse Source

Fix issue with precondition checking

Previously `commands.Count` would never change, so by the current logic
it was never checking the last command.

Fixes: https://github.com/RogueException/Discord.Net/issues/514
pull/515/head
IlmrynX 8 years ago
parent
commit
45e58894f2
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Commands/CommandService.cs

+ 1
- 1
src/Discord.Net.Commands/CommandService.cs View File

@@ -250,7 +250,7 @@ namespace Discord.Commands
var preconditionResult = await commands[i].CheckPreconditionsAsync(context, dependencyMap).ConfigureAwait(false);
if (!preconditionResult.IsSuccess)
{
if (commands.Count == 1)
if (i == 1)
return preconditionResult;
else
continue;


Loading…
Cancel
Save