temp fix for trivia

This commit is contained in:
Master Kwoth 2016-02-12 12:04:39 +01:00
parent 41d44d1c05
commit d589ef7449

View File

@ -20,8 +20,11 @@ namespace NadekoBot.Classes.Trivia {
Reload();
}
public TriviaQuestion GetRandomQuestion(List<TriviaQuestion> exclude) =>
pool.Except(exclude).ToList()[_r.Next(0, pool.Count)];
public TriviaQuestion GetRandomQuestion(List<TriviaQuestion> exclude) {
var list = pool.Except(exclude).ToList();
var rand = _r.Next(0, list.Count);
return list[rand];
}
internal void Reload() {
JArray arr = JArray.Parse(File.ReadAllText("data/questions.txt"));