Skip to content

Commit

Permalink
Unknown overload should return UnknownCommand instead of ParseFailed
Browse files Browse the repository at this point in the history
  • Loading branch information
Auralytical committed Aug 17, 2016
1 parent 625f785 commit 0b25554
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/Discord.Net.Commands/CommandError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ public enum CommandError
ObjectNotFound,
MultipleMatches,

//Preconditions
UnmetPrecondition,

//Execute
Exception,
UnmetPrecondition
Exception
}
}
2 changes: 1 addition & 1 deletion src/Discord.Net.Commands/CommandService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public async Task<IResult> Execute(IMessage message, string input)
return executeResult;
}

return ParseResult.FromError(CommandError.ParseFailed, "This input does not match any overload.");
return SearchResult.FromError(CommandError.UnknownCommand, "This input does not match any overload.");
}
}
}

0 comments on commit 0b25554

Please sign in to comment.