<commit_before>﻿using Discord;
using Discord.Modules;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;

namespace DiscordBot.Modules.TwitchEmotes
{
    internal class TwitchEmotesModule : IModule
    {
        private ModuleManager _manager;
        private DiscordClient _client;
        private const string path = "./config/emotes/";

        private string[] EmotePath = Directory.GetFiles(path, "*.png");

        private string[] Emotes = Directory
                    .GetFiles(path, "*.png")
                    .Select(Path.GetFileNameWithoutExtension).ToArray();

        void IModule.Install(ModuleManager manager)
        {
            _manager = manager;
            _client = manager.Client;

            _client.MessageReceived += async (s, e) =>
            {
                try
                {
                    var ma = e.Message.Text.Split(null);

                    if (ma.Any(Emotes.Contains))
                    {
                        if (ma.Where(Emotes.Contains).Count() > 1)
                        {
                            var emotes = ma.Where(Emotes.Contains);
                            var images = new List<Image>();

                            foreach (string x in emotes)
                            {
                                using (Stream stream = File.OpenRead(path + x + ".png"))
                                {
                                    Image image = Image.FromStream(stream, false, false);
                                    images.Add(image);
                                }
                            }
                            // lol
                            MergeImages(images).Save("asd.png");
                            await e.Channel.SendFile("asd.png");<commit_msg>testing direct edit<commit_after>﻿using Discord;
using Discord.Modules;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;

namespace DiscordBot.Modules.TwitchEmotes
{
    internal class TwitchEmotesModule : IModule
    {
        private ModuleManager _manager;
        private DiscordClient _client;
        private const string path = "./config/emotes/";

        private string[] EmotePath = Directory.GetFiles(path, "*.png");

        private string[] Emotes = Directory
                    .GetFiles(path, "*.png")
                    .Select(Path.GetFileNameWithoutExtension).ToArray();

        void IModule.Install(ModuleManager manager)
        {
            _manager = manager;
            _client = manager.Client;

            _client.MessageReceived += async (s, e) =>
            {
                try
                {
                    var ma = e.Message.Text.Split(null);

                    if (ma.Any(Emotes.Contains))
                    {
                        if (ma.Where(Emotes.Contains).Count() > 1 && ma.Where(Emotes.Contains).Count() < 10)
                        {
                            var emotes = ma.Where(Emotes.Contains);
                            var images = new List<Image>();

                            foreach (string x in emotes)
                            {
                                using (Stream stream = File.OpenRead(path + x + ".png"))
                                {
                                    Image image = Image.FromStream(stream, false, false);
                                    images.Add(image);
                                }
                            }
                            // lol
                            MergeImages(images).Save("asd.png");
                            await e.Channel.SendFile("asd.png");
{'fraction_non_alphanumeric': 0.09304871373836891, 'fraction_numerical': 0.0010946907498631637, 'mean_word_length': 1.1374269005847952, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3747247', 'n_tokens_mistral': 879, 'n_tokens_neox': 836, 'n_words': 181}