예제 #1
0
파일: Misc.cs 프로젝트: Yoshitsune1998/PWBG
        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);
        }