Пример #1
0
        protected override async Task <string> GetCheckCorrectAsync(string userAnswer)
        {
            string cleanUserAnswer = Utilities.CleanWord(userAnswer);

            foreach (string s in _toGuess)
            {
                if (cleanUserAnswer == Utilities.CleanWord(s))
                {
                    return(null);
                }
            }
            if (IsDictionnaryFull())
            {
                if (!_dictionnary.Any(x => Utilities.CleanWord(x) == cleanUserAnswer))
                {
                    return("❌");
                }
            }
            foreach (string s in _toGuess)
            {
                string cleanGuess = Utilities.CleanWord(s);
                if (cleanUserAnswer.Contains(cleanGuess) || cleanGuess.Contains(cleanUserAnswer))
                {
                    return(Sentences.BooruGuessClose(GetGuild(), userAnswer.Replace("@everyone", "@ everyone")));
                }
            }
            return("❌");
        }