<commit_before>'use strict'

var Discord = require('discord.js');
const config = require('../../config/config.json');
const commands = require('./commands/');
const permissions = require('./permissions.js');
const subscriptionManager = require('./subscribers');
const reactions = require('./subscribers/reactions.js');
const copySystem = require('./subscribers/spy.js');

// Launch the bot
var bot = new Discord.Client();

bot.on('ready', () => {

    // Launch reactions system
    reactions.initReactions(bot.guilds);
    copySystem.initCopy(bot);
  
    console.log('Bot launched.');
});

// For every message posted
bot.on('message', msg => {

    // If a command has been called
    if(msg.content[0] === config.PREFIX) {

        // Get command name
        const commandName = msg.content.split(' ')[0].substring(1).toLowerCase();

        // Get command
        const command = commands.lookForCommand(commandName);

        if(command) {
            console.log('Command called: ' + commandName);

            // Get context
            const context = 
            {
                msg: msg,
                bot: bot,
                pm: msg.channel.type === 'dm',
                args: msg.content.substring(commandName.length + 2)
            };

            commands.executeCommand(command, commandName, context);
        }
        else {
            // Command doesn't exist
            console.log('No command found !');
            msg.channel.sendMessage('Sorry I can\'t understand what you mean ! :worried:');
        }
    }
    else {
        // React to content
        subscriptionManager.react(msg);
    }

    // If the bot has been mentionned
    if(msg.mentions.users.size > 0) {
        if(msg.mentions.users.get(bot.user.id)) {

            // Do something here when the bot is mentionned
            msg.channel.sendMessage('I\'ve heard my name?');
        }
    }
});

bot.login(process.env.TOKEN);<commit_msg>Removed alert message when command is not found<commit_after>'use strict'

var Discord = require('discord.js');
const config = require('../../config/config.json');
const commands = require('./commands/');
const permissions = require('./permissions.js');
const subscriptionManager = require('./subscribers');
const reactions = require('./subscribers/reactions.js');
const copySystem = require('./subscribers/spy.js');

// Launch the bot
var bot = new Discord.Client();

bot.on('ready', () => {

    // Launch reactions system
    reactions.initReactions(bot.guilds);
    copySystem.initCopy(bot);
  
    console.log('Bot launched.');
});

// For every message posted
bot.on('message', msg => {

    // If a command has been called
    if(msg.content[0] === config.PREFIX) {

        // Get command name
        const commandName = msg.content.split(' ')[0].substring(1).toLowerCase();

        // Get command
        const command = commands.lookForCommand(commandName);

        if(command) {
            console.log('Command called: ' + commandName);

            // Get context
            const context = 
            {
                msg: msg,
                bot: bot,
                pm: msg.channel.type === 'dm',
                args: msg.content.substring(commandName.length + 2)
            };

            commands.executeCommand(command, commandName, context);
        }
        else {
            // Command doesn't exist
            console.warn(`Command not found: ${commandName}`);
        }
    }
    else {
        // React to content
        subscriptionManager.react(msg);
    }

    // If the bot has been mentionned
    if(msg.mentions.users.size > 0) {
        if(msg.mentions.users.get(bot.user.id)) {

            // Do something here when the bot is mentionned
            msg.channel.sendMessage('I\'ve heard my name?');
        }
    }
});

bot.login(process.env.TOKEN);
{'fraction_non_alphanumeric': 0.14140625, 'fraction_numerical': 0.0026041666666666665, 'mean_word_length': 2.1227642276422762, 'pattern_counts': {'":': 0, '<': 3, '<?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': '758727', 'n_tokens_mistral': 1073, 'n_tokens_neox': 1047, 'n_words': 253}