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