Fix bug where Enum.Parse would always pass if a number was given as argument in rank
This commit is contained in:
parent
5109cc03a4
commit
3e3cbc257e
1 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -46,7 +46,8 @@ namespace Geekbot.net.Commands.User.Ranking
|
|||
HighscoreTypes type;
|
||||
try
|
||||
{
|
||||
type = Enum.Parse<HighscoreTypes>(typeUnformated.ToLower());
|
||||
type = Enum.Parse<HighscoreTypes>(typeUnformated, true);
|
||||
if (!Enum.IsDefined(typeof(HighscoreTypes), type)) throw new Exception();
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue