Example #1
0
        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;
        }
Example #2
0
        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);
        }
Example #3
0
 internal static void FinishGame(TriviaGame triviaGame)
 {
     runningTrivias.Remove(runningTrivias.Where(kvp => kvp.Value == triviaGame).First().Key);
 }
Example #4
0
 internal static void FinishGame(TriviaGame triviaGame)
 {
     runningTrivias.Remove(runningTrivias.Where(kvp => kvp.Value == triviaGame).First().Key);
 }