<commit_before>﻿using Discord.Addons.Interactive;
using Discord.Commands;
using Discord.WebSocket;
using MoreLinq;
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using YuGiOh.Bot.Models;
using YuGiOh.Bot.Models.Criterion;
using YuGiOh.Bot.Models.Deserializers;
using YuGiOh.Bot.Services;
using YuGiOh.Bot.Extensions;
using YuGiOh.Bot.Models.Cards;

namespace YuGiOh.Bot.Modules
{
    [RequireContext(ContextType.Guild)]
    public class Games : MainBase
    {

        private readonly Criteria<SocketMessage> _criteria = new Criteria<SocketMessage>()
                .AddCriterion(new EnsureSourceChannelCriterion())
                .AddCriterion(new EnsureNotBot());

        [Command("guess")]
        [Summary("Starts an image/card guessing game!")]
        public async Task GuessCommand()
        {

            if (Cache.GuessInProgress.TryAdd(Context.Channel.Id, null))
            {

                //var art = await GetArt();

                //Console.WriteLine(art.Value);

                //using (var stream = await _web.GetStream(art.Value).ConfigureAwait(false))
                //{

                //    await UploadAsync(stream, $"{GenObufscatedString()}.png", ":stopwatch: You have **60** seconds to guess what card this art belongs to! Case sensitive!");
                //    await stream.FlushAsync();

                //}

                Card card = null;
                Exception e;

                do
                {

                    try
                    {

                        card = await YuGiOhDbService.GetRandomCardAsync();

                        var url = $"{Constants.ArtBaseUrl}{card.Passcode}.{Constants.ArtFileType}";

                        //$"https://storage.googleapis.com/ygoprodeck.com/pics_artgame/{passcode}.jpg"
                        Console.WriteLine($"{card.Name}\n{Constants.ArtBaseUrl}{card.Passcode}.{Constants.ArtFileType}");

                        using (var stream = await Web.GetStream(url))
                            await UploadAsync(stream, $"{GenObufscatedString()}.{Constants.ArtFileType}", $":stopwatch: You have **{_guildConfig.GuessTime}** seconds to guess what card this art belongs to! Case sensitive!");
<commit_msg>Fixed guess start message to state it's case insensitive<commit_after>﻿using Discord.Addons.Interactive;
using Discord.Commands;
using Discord.WebSocket;
using MoreLinq;
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using YuGiOh.Bot.Models;
using YuGiOh.Bot.Models.Criterion;
using YuGiOh.Bot.Models.Deserializers;
using YuGiOh.Bot.Services;
using YuGiOh.Bot.Extensions;
using YuGiOh.Bot.Models.Cards;

namespace YuGiOh.Bot.Modules
{
    [RequireContext(ContextType.Guild)]
    public class Games : MainBase
    {

        private readonly Criteria<SocketMessage> _criteria = new Criteria<SocketMessage>()
                .AddCriterion(new EnsureSourceChannelCriterion())
                .AddCriterion(new EnsureNotBot());

        [Command("guess")]
        [Summary("Starts an image/card guessing game!")]
        public async Task GuessCommand()
        {

            if (Cache.GuessInProgress.TryAdd(Context.Channel.Id, null))
            {

                //var art = await GetArt();

                //Console.WriteLine(art.Value);

                //using (var stream = await _web.GetStream(art.Value).ConfigureAwait(false))
                //{

                //    await UploadAsync(stream, $"{GenObufscatedString()}.png", ":stopwatch: You have **60** seconds to guess what card this art belongs to! Case sensitive!");
                //    await stream.FlushAsync();

                //}

                Card card = null;
                Exception e;

                do
                {

                    try
                    {

                        card = await YuGiOhDbService.GetRandomCardAsync();

                        var url = $"{Constants.ArtBaseUrl}{card.Passcode}.{Constants.ArtFileType}";

                        //$"https://storage.googleapis.com/ygoprodeck.com/pics_artgame/{passcode}.jpg"
                        Console.WriteLine($"{card.Name}\n{Constants.ArtBaseUrl}{card.Passcode}.{Constants.ArtFileType}");

                        using (var stream = await Web.GetStream(url))
                            await UploadAsync(stream, $"{GenObufscatedString()}.{Constants.ArtFileType}", $":stopwatch: You have **{_guildConfig.GuessTime}** seconds to guess what card this art belongs to! Case insensitive (used to be case sensitive)!");

{'fraction_non_alphanumeric': 0.11188382082225404, 'fraction_numerical': 0.0008181632235631009, 'mean_word_length': 2.2730923694779115, 'pattern_counts': {'":': 4, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '212036', 'n_tokens_mistral': 1376, 'n_tokens_neox': 1304, 'n_words': 289}