<commit_before>class BaseEvent {
    constructor(bot) {
        if (this.constructor === BaseEvent) {
            throw new Error('Cannot instantiate abstract BaseEvent.')
        }

        this.bot = bot;
        this.eventHandler = null;


    }

    get event() {
        throw new Error('Must override Event.');
    }

    load() {
        if (this.eventHandler === null) {
            throw new Error('Must override eventHandler.')
        }
        this.bot.on(this.event, this.eventHandler);
    }

    remove() {
        this.bot.removeListener(this.event, this.eventHandler);
    }

}

module.exports = BaseEvent;<commit_msg>Made making events a bit easier<commit_after>class BaseEvent {
    constructor(bot) {
        if (this.constructor === BaseEvent)
            throw new Error('Cannot instantiate abstract BaseEvent.')
        if (typeof this.event === 'string')
            throw new Error('Must override Event.');
        this.bot = bot;
    }

    load() {
        if (this.eventHandler === null) {
            throw new Error('Must override eventHandler.')
        }
        this.bot.on(this.event, this.eventHandler);
    }

    remove() {
        this.bot.removeListener(this.event, this.eventHandler);
    }

}

module.exports = BaseEvent;
{'fraction_non_alphanumeric': 0.12282091917591126, 'fraction_numerical': 0.0, 'mean_word_length': 2.126237623762376, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1330073', 'n_tokens_mistral': 361, 'n_tokens_neox': 350, 'n_words': 82}