Exemple #1
0
        public async Task Answering([Remainder] string answer)
        {
            if (!GlobalVar.QuizHasBeenStarted)
            {
                return;
            }
            if (!IsHavingThisRole((SocketGuildUser)Context.User, "Survivor"))
            {
                return;
            }
            if (UserAccounts.IsDead(Context.User))
            {
                return;
            }
            UserAccount user  = UserAccounts.GetUserAccount(Context.User);
            ulong       id    = GlobalVar.Selected.ID;
            int         point = Quizzes.CheckAnswer(answer, id);

            if (point == 0)
            {
                return;
            }
            await Context.Channel.SendMessageAsync($"{Context.User.Mention} {point} point(s)");

            UserAccounts.TempPoints(user, point);
        }