<commit_before>﻿using System;
using System.Collections.Generic;
using System.Text;
using Discord.Rpc;

namespace Coremero.Client.Discord
{
    public class DiscordMessage : IMessage
    {
        private global::Discord.IMessage _message;

        public DiscordMessage(global::Discord.IMessage discordMessage)
        {
            _message = discordMessage;
        }

        public string Text
        {
            get { return _message.Content; }
        }

        public List<IAttachment> Attachments
        {
            get
            {
                // TODO: Convert attachments.
                return null;
            }
        }
    }
}<commit_msg>reactions<commit_after>﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Discord;
using Discord.Rest;
using Discord.Rpc;

namespace Coremero.Client.Discord
{
    public class DiscordMessage : IMessage
    {
        private global::Discord.IMessage _message;

        public DiscordMessage(global::Discord.IMessage discordMessage)
        {
            _message = discordMessage;
        }

        public string Text
        {
            get { return _message.Content; }
        }

        public List<IAttachment> Attachments
        {
            get
            {
                // TODO: Convert attachments.
                return null;
            }
        }

        public async Task React(string emoji)
        {
            var restMessage = (RestUserMessage) await _message.Channel.GetMessageAsync(_message.Id);
            await restMessage.AddReactionAsync(emoji);
        }

        public async Task<List<string>> GetReactions()
        {
            var restMessage = (RestUserMessage) await _message.Channel.GetMessageAsync(_message.Id);
            List<string> result = new List<string>();
            foreach (KeyValuePair<Emoji, int> reaction in restMessage.Reactions)
            {
                for (int i = 0; i < reaction.Value; i++)
                {
                    result.Add(reaction.Key.ToString());
                }
            }
            return result;
        }
    }
}
{'fraction_non_alphanumeric': 0.08149882903981265, 'fraction_numerical': 0.000468384074941452, 'mean_word_length': 1.6834170854271358, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 10, 'https://': 0, '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': '1454800', 'n_tokens_mistral': 565, 'n_tokens_neox': 547, 'n_words': 121}