Beispiel #1
0
        public async Task Answer(params string[] answerWords)
        {
            IUser  user = Context.User;
            string ans  = "";

            for (int i = 0; answerWords.Length > i; i++)
            {
                ans += answerWords[i] + ' ';
            }
            ans = ans.Substring(0, ans.Length - 1);
            switch (ZagadkaService.CheckAnswer(ans))
            {
            case AnswerResult.Guessed:
                break;

            case AnswerResult.WrongAnswer:
                ReputationService.ChangeRep(Context.User, -3);
                await ReplyAsync($"Neverno, {user.Username}.");

                break;

            case AnswerResult.CorrectAnswer:
                ReputationService.ChangeRep(Context.User, 10);
                await ReplyAsync($"Верно, {user.Username}.");

                break;
            }
        }
Beispiel #2
0
        public async Task Answer(string ans)
        {
            switch (ZagadkaService.CheckAnswer(ans))
            {
            case AnswerResult.Guessed:
                break;

            case AnswerResult.WrongAnswer:
                ReputationService.ChangeRep(Context.User, -3);
                break;

            case AnswerResult.CurrectAnswer:
                ReputationService.ChangeRep(Context.User, 10);
                await ReplyAsync("Верно");

                break;
            }
        }