public static TriviaGame StartNewGame(CommandEventArgs e) { if (runningTrivias.ContainsKey(e.User.Server.Id)) return null; var tg = new TriviaGame(e, NadekoBot.client); runningTrivias.Add(e.Server.Id, tg); return tg; }
public static TriviaGame StartNewGame(CommandEventArgs e) { if (runningTrivias.ContainsKey(e.User.Server.Id)) { return(null); } var tg = new TriviaGame(e, NadekoBot.client); runningTrivias.Add(e.Server.Id, tg); return(tg); }
internal static void FinishGame(TriviaGame triviaGame) { runningTrivias.Remove(runningTrivias.Where(kvp => kvp.Value == triviaGame).First().Key); }