<commit_before>const Discord = require('discord.js');
const client = new Discord.Client();

// https://discordapp.com/oauth2/authorize?&client_id=368144406181838861&scope=bot&permissions=3072

client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}!`);
  client.user.setPresence({
    game: {
      name: 'WoWAnalyzer.com',
      type: 0,
    },
  });
});

client.on('message', msg => {
  const content = msg.content;
  // TODO: create a group for the # part of the WCL URL
  const match = content.trim().match(/^(.*reports\/)?([a-zA-Z0-9]{16})\/?(#.*)?(.*)?$/);
  if (match && match[2]) {
    // TODO: filter for fight=XX and source=XX for #444
    msg.channel.send(`https://wowanalyzer.com/report/${match[2]}`);
  }
});

client.login(process.env.DISCORD_TOKEN);<commit_msg>Update DiscordBot: Shorter game setting & don't respond to bots<commit_after>const Discord = require('discord.js');
const client = new Discord.Client();

// https://discordapp.com/oauth2/authorize?&client_id=368144406181838861&scope=bot&permissions=3072

client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}!`);
  client.user.setGame('WoWAnalyzer.com');
});

client.on('message', msg => {
  if (msg.author.bot) {
    return;
  }
  const content = msg.content;
  // TODO: create a group for the # part of the WCL URL
  const match = content.trim().match(/^(.*reports\/)?([a-zA-Z0-9]{16})\/?(#.*)?(.*)?$/);
  if (match && match[2]) {
    // TODO: filter for fight=XX and source=XX for #444
    msg.channel.send(`https://wowanalyzer.com/report/${match[2]}`);
  }
});

client.login(process.env.DISCORD_TOKEN);
{'fraction_non_alphanumeric': 0.2112415071031501, 'fraction_numerical': 0.04014823965410747, 'mean_word_length': 3.9846153846153847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '5067717', 'n_tokens_mistral': 633, 'n_tokens_neox': 596, 'n_words': 107}