<commit_before>/**
@Author: <NAME>, <NAME>
@Version: 0.4
@date: 19.07.2017
@email:
@run: node gladosBot.js
**/

import * as fs from "fs";
import * as CONFIG from './config/config.json';
import * as Discord from "discord.js";
import {Sentences} from "./classes/commands/fun/sentences.class";
import {Commands} from "./classes/commands/util/prefixCommands.class";
import {HimeBot} from "./classes/commands/delete/himeBot.class";
import {GladosBot} from "./classes/commands/delete/gladosBot.class";
import {Soundboard} from "./classes/commands/music/soundboard.class";
import {Play} from "./classes/commands/music/play.class";
import {Stop} from "./classes/commands/music/stop.class";
import {Pause} from "./classes/commands/music/pause.class";
import {Resume} from "./classes/commands/music/resume.class";
import {YoutubeSearch} from "./classes/commands/music/search.class";
import {Doing} from "./classes/commands/info/doing.class";
import {Helper} from "./classes/helper/helper.class";
import {UserRoles} from "./classes/helper/roles.class";
import {} from "./classes/handler/bootstrap.class";
import ytdl = require('ytdl-core');
import search = require('youtube-search');

const wPrefix = new Commands();
const helper = new Helper();
const roles = new UserRoles();
const infoDoStuff = new Doing();
const sentences = new Sentences();
const himeBot = new HimeBot();
const gladowBot = new GladosBot();
const play = new Play();
const stop = new Stop();
const pause = new Pause();
const resume = new Resume();
const newSoundboard = new Soundboard();
const yt_search = new YoutubeSearch();
const client = new Discord.Client();

const ytAudioQueue = [];
const ytSongQueue = [];
const dispatcher = null;


// Create ready event listener
client.on('ready', () => {
    console.log('Logged in as: ' + client.user.tag + '!');
    console.log('Logged in at: ' + helper.gct());
});

// Create message listener
client.on('message', msg => {
    // declare vars using msg
    let userRole: any = roles.getRoles(msg);

    // Prevents bot is calling own commands. Could end in infinite loop.
    if (msg.author.bot && msg.content.startsWith(CONFIG.prefix)) return;

    // Call classes here
    sentences.getCommands(msg, helper, client, ytdl, CONFIG);
    wPrefix.getCommands(msg, CONFIG, helper, fs);
    himeBot.delete(msg, CONFIG, helper);
    gladowBot.delete(msg, CONFIG, helper);
    infoDoStuff.getCommands(msg, CONFIG, helper);
    play.play(msg, CONFIG, ytdl, ytSongQueue, client, dispatcher, userRole);
    stop.stop(msg, CONFIG, ytSongQueue, ytAudioQueue);
    newSoundboard.getCommands(msg, CONFIG, ytdl, ytAudioQueue, client, dispatcher, userRole, ytSongQueue);

});

// insert or remove bot token
client.login("<KEY>");
<commit_msg>- restored client token<commit_after>/**
@Author: <NAME>, <NAME>
@Version: 0.4
@date: 19.07.2017
@email:
@run: node gladosBot.js
**/

import * as fs from "fs";
import * as CONFIG from './config/config.json';
import * as Discord from "discord.js";
import {Sentences} from "./classes/commands/fun/sentences.class";
import {Commands} from "./classes/commands/util/prefixCommands.class";
import {HimeBot} from "./classes/commands/delete/himeBot.class";
import {GladosBot} from "./classes/commands/delete/gladosBot.class";
import {Soundboard} from "./classes/commands/music/soundboard.class";
import {Play} from "./classes/commands/music/play.class";
import {Stop} from "./classes/commands/music/stop.class";
import {Pause} from "./classes/commands/music/pause.class";
import {Resume} from "./classes/commands/music/resume.class";
import {YoutubeSearch} from "./classes/commands/music/search.class";
import {Doing} from "./classes/commands/info/doing.class";
import {Helper} from "./classes/helper/helper.class";
import {UserRoles} from "./classes/helper/roles.class";
import {} from "./classes/handler/bootstrap.class";
import ytdl = require('ytdl-core');
import search = require('youtube-search');

const wPrefix = new Commands();
const helper = new Helper();
const roles = new UserRoles();
const infoDoStuff = new Doing();
const sentences = new Sentences();
const himeBot = new HimeBot();
const gladowBot = new GladosBot();
const play = new Play();
const stop = new Stop();
const pause = new Pause();
const resume = new Resume();
const newSoundboard = new Soundboard();
const yt_search = new YoutubeSearch();
const client = new Discord.Client();

const ytAudioQueue = [];
const ytSongQueue = [];
const dispatcher = null;


// Create ready event listener
client.on('ready', () => {
    console.log('Logged in as: ' + client.user.tag + '!');
    console.log('Logged in at: ' + helper.gct());
});

// Create message listener
client.on('message', msg => {
    // declare vars using msg
    let userRole: any = roles.getRoles(msg);

    // Prevents bot is calling own commands. Could end in infinite loop.
    if (msg.author.bot && msg.content.startsWith(CONFIG.prefix)) return;

    // Call classes here
    sentences.getCommands(msg, helper, client, ytdl, CONFIG);
    wPrefix.getCommands(msg, CONFIG, helper, fs);
    himeBot.delete(msg, CONFIG, helper);
    gladowBot.delete(msg, CONFIG, helper);
    infoDoStuff.getCommands(msg, CONFIG, helper);
    play.play(msg, CONFIG, ytdl, ytSongQueue, client, dispatcher, userRole);
    stop.stop(msg, CONFIG, ytSongQueue, ytAudioQueue);
    newSoundboard.getCommands(msg, CONFIG, ytdl, ytAudioQueue, client, dispatcher, userRole, ytSongQueue);

});

// insert or remove bot token
client.login(process.env.BOT_TOKEN);

{'fraction_non_alphanumeric': 0.15543002915451895, 'fraction_numerical': 0.0036443148688046646, 'mean_word_length': 4.606741573033708, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 12, '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': '4845847', 'n_tokens_mistral': 1742, 'n_tokens_neox': 1705, 'n_words': 479}