<commit_before>'use strict';
const eightBallResponses = require('../assets/8ball.json'), //Array of responses an 8ball would make
    gm = require('gm'), //GraphicsMagik module
    moment = require('moment'),
    request = require('request'),
    fs = require('fs'),
    path = require('path'),
    utils = require('./utilities.js')(),
    evaluate = require('static-eval'),
    parse = require('esprima').parse,
    nodecraft = require('nodecraft-api');

module.exports = function (options, discord, mongo, twitter) {
    const hat = require('./hat.js')(options, discord);
    const nodecraftAPI = nodecraft(options.nodecraft.username, options.nodecraft.api_key);

    discord.client.on('message', (message) => { //A message was sent in a Discord channel
        if (message.author.id == discord.client.user.id) return; //Exit if message is from self(bot)
        if (message.content.startsWith(options.commands.prefix)) handleCommands(message); //If the first part of the message is the command prefix handle commands

        if (message.content.includes("mod chat")) {
            discord.client.sendMessage(message, "There is no mod chat.");
        }

    });

    //A command was ran, send to proper function
    function handleCommands(message) {
        if (!message.channel.isPrivate) { //Log command usage
            utils.log("[" + message.server.name + "] {#" + message.channel.name + "} <" + message.author.username + "> " + message.content);
        } else {
            utils.log("[PRIVATE] <" + message.author.username + "> " + message.content);
        }<commit_msg>Test modchat troll with RegEx<commit_after>'use strict';
const eightBallResponses = require('../assets/8ball.json'), //Array of responses an 8ball would make
    gm = require('gm'), //GraphicsMagik module
    moment = require('moment'),
    request = require('request'),
    fs = require('fs'),
    path = require('path'),
    utils = require('./utilities.js')(),
    evaluate = require('static-eval'),
    parse = require('esprima').parse,
    nodecraft = require('nodecraft-api');

module.exports = function (options, discord, mongo, twitter) {
    const hat = require('./hat.js')(options, discord);
    const nodecraftAPI = nodecraft(options.nodecraft.username, options.nodecraft.api_key);

    let mod_chat = new RegExp("mod\s?chat", "gmi");
    discord.client.on('message', (message) => { //A message was sent in a Discord channel
        if (message.author.id == discord.client.user.id) return; //Exit if message is from self(bot)
        if (message.content.startsWith(options.commands.prefix)) handleCommands(message); //If the first part of the message is the command prefix handle commands

        if (mod_chat.test(message.content)) {
            discord.client.sendMessage(message, "There is no mod chat.");
        }
    });

    //A command was ran, send to proper function
    function handleCommands(message) {
        if (!message.channel.isPrivate) { //Log command usage
            utils.log("[" + message.server.name + "] {#" + message.channel.name + "} <" + message.author.username + "> " + message.content);
        } else {
            utils.log("[PRIVATE] <" + message.author.username + "> " + message.content);
        }
{'fraction_non_alphanumeric': 0.1525843392138657, 'fraction_numerical': 0.0012380068090374497, 'mean_word_length': 3.1974025974025975, 'pattern_counts': {'":': 0, '<': 7, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6028704', 'n_tokens_mistral': 925, 'n_tokens_neox': 903, 'n_words': 238}