<commit_before>package com.mrpowergamerbr.loritta.commands.vanilla.social

import com.github.kevinsawicki.http.HttpRequest
import com.google.gson.JsonParser
import com.mrpowergamerbr.loritta.commands.CommandBase
import com.mrpowergamerbr.loritta.commands.CommandCategory
import com.mrpowergamerbr.loritta.commands.CommandContext
import com.mrpowergamerbr.loritta.utils.LorittaUtils
import java.util.*

class McUUIDCommand : CommandBase() {
    override fun getLabel(): String {
        return "mcuuid";
    }

    override fun getDescription(): String {
        return "Pega a UUID de um usuário";
    }

    override fun getUsage(): String {
        return "nickname"
    }

    override fun getExample(): List<String> {
        return Arrays.asList("Monerk")
    }

    override fun getCategory(): CommandCategory {
        return CommandCategory.MINECRAFT;
    }

    override fun run(context: CommandContext) {
        if (context.args.size > 0) {
            var player = context.args[0];

            var data = HttpRequest.get("https://api.mojang.com/users/profiles/minecraft/" + player).body();


            try {
                var json = JsonParser().parse(data).asJsonObject;

                context.sendMessage(context.getAsMention(true) + "A UUID de " + player + ": `" + LorittaUtils.getUUID(json.get("id").asString) + "`");
            } catch (e: IllegalStateException) {
                context.sendMessage(context.getAsMention(true) + "Player não encontrado! Tem certeza que `" + player + "` é uma conta válida?");
            }
        } else {
            this.explain(context);
        }
    }
}<commit_msg>Melhorar "+mcuuid" e usar Kotson nele<commit_after>package com.mrpowergamerbr.loritta.commands.vanilla.social

import com.github.kevinsawicki.http.HttpRequest
import com.github.salomonbrys.kotson.string
import com.google.gson.JsonParser
import com.mrpowergamerbr.loritta.commands.CommandBase
import com.mrpowergamerbr.loritta.commands.CommandCategory
import com.mrpowergamerbr.loritta.commands.CommandContext
import com.mrpowergamerbr.loritta.utils.LorittaUtils
import java.util.*

class McUUIDCommand : CommandBase() {
    override fun getLabel(): String {
        return "mcuuid";
    }

    override fun getDescription(): String {
        return "Pega a UUID de um usuário";
    }

    override fun getUsage(): String {
        return "nickname"
    }

    override fun getExample(): List<String> {
        return Arrays.asList("Monerk")
    }

    override fun getCategory(): CommandCategory {
        return CommandCategory.MINECRAFT;
    }

    override fun run(context: CommandContext) {
        if (context.args.size > 0) {
            var player = context.args[0];

            var data = HttpRequest.get("https://api.mojang.com/users/profiles/minecraft/" + player).body();


            try {
                var json = JsonParser().parse(data).asJsonObject;

                context.sendMessage(context.getAsMention(true) + "A UUID de " + player + ": `" + LorittaUtils.getUUID(json["id"].string) + "`");
            } catch (e: IllegalStateException) {
                context.sendMessage(LorittaUtils.ERROR + " | " + context.getAsMention(true) + "Player não encontrado! Tem certeza que `" + player + "` é uma conta válida?");
            }
        } else {
            this.explain(context);
        }
    }
}
{'fraction_non_alphanumeric': 0.11518949567293345, 'fraction_numerical': 0.001193673530289466, 'mean_word_length': 2.783295711060948, 'pattern_counts': {'":': 2, '<': 5, '<?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': '6991385', 'n_tokens_mistral': 1022, 'n_tokens_neox': 994, 'n_words': 198}