temp fix for trivia
This commit is contained in:
parent
41d44d1c05
commit
d589ef7449
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user