<commit_before>class UuidLookup
  include Cinch::Plugin

  match /uuid (.+)/, method: :lookforit
  def lookforit(m, name)
    m.reply "The UUID of #{name} is: #{JSON.parse(RestClient.get("https://api.mojang.com/users/profiles/minecraft/#{name}"))['id']}"
  end
end<commit_msg>Improvements to UUID lookup<commit_after>class UuidLookup
  include Cinch::Plugin

  match /uuid (.+)/, method: :lookforit
  def lookforit(m, name)
    if JSON.parse(RestClient.get("https://use.gameapis.net/mc/player/profile/#{name}"))['error'] != nil
      m.reply "Error: #{JSON.parse(RestClient.get("https://use.gameapis.net/mc/player/profile/#{name}"))['error']} Make sure it is spelled correctly. (It is not case-sensitive)"
    else
      m.reply "The UUID of #{JSON.parse(RestClient.get("https://use.gameapis.net/mc/player/profile/#{name}"))['name']} is: #{JSON.parse(RestClient.get("https://use.gameapis.net/mc/player/profile/#{name}"))['uuid_formatted']}"
    end
  end
end
{'fraction_non_alphanumeric': 0.1951983298538622, 'fraction_numerical': 0.0, 'mean_word_length': 4.641176470588236, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, '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': '5750544', 'n_tokens_mistral': 343, 'n_tokens_neox': 336, 'n_words': 60}