<commit_before>module.exports = {


  init: function(Bot, Config, Helpers) {

    var that = this

    Bot.on('err', function(err) {

      that.onError({
        'err': err
      }, Bot, Config);

    });

    Bot.on('ready', function(rawEvent) {


      that.onReady({
        'rawEvent': rawEvent
      }, Bot, Config);

    });

    Bot.on('disconnected', function() {

      that.onDisconnected({}, Bot, Config);

    });

    Bot.on('debug', function(rawEvent) {

      that.onDebug({
        'rawEvent': rawEvent
      }, Bot, Config);

    });

    Bot.on('message', function(user, userID, channelID, message, rawEvent) {

      that.onMessage({
        'user': user,
        'userID': userID,
        'channelID': channelID,
        'message': message,
        'rawEvent': rawEvent
      }, Bot, Config, Helpers);

    });

    Bot.on('presence', function(user, userID, status, rawEvent) {

      that.onPresence({
        'user': user,
        'userID': userID,
        'status': status,
        'rawEvent': rawEvent
      }, Bot, Config, Helpers);

    });

  },

  onError: function(data, Bot, Config) {

    throw new Error(data.err);

  },

  onReady: function(data, Bot, Config) {

    console.success('Le bot est connecté.');

    InternalEvents.emit('connected');

    this.State.connected = true;
    this.State.connection = false;

  },

  onDisconnected: function(data, Bot, Config) {

    console.warn('Le bot à été déconnecté');

    if(this.State.disconnection == true)
      return;

    if(Config.autoReconnect != true)
      return;

    console.info('Le bot sera automatiquement reconnecté ...');

    this.State.connected = false;
    this.State.connection = true;

    InternalEvents.emit('connection');

    Bot.connect();

  },

  onDebug: function(data, Bot, Config) {

    if(!Config.debug)
      return;

    console.log(
      'debug:',
      '\n',
      data.rawEvent
      );

  },

  onMessage: function(data, Bot, Config, Helpers) {

    this.filters(data, Bot, Config, Helpers);
    this.commands(data, Bot, Config, Helpers);

  },

  onPresence: function(data, Bot, Config, Helpers) { 

    this.database(data, Bot, Config, Helpers);

  },

  commands: require('./commands'),
  filters: require('./filters'),
  database: require('./db'),
<commit_msg>Desactivation message de bienvenue<commit_after>module.exports = {


  init: function(Bot, Config, Helpers) {

    var that = this

    Bot.on('err', function(err) {

      that.onError({
        'err': err
      }, Bot, Config);

    });

    Bot.on('ready', function(rawEvent) {


      that.onReady({
        'rawEvent': rawEvent
      }, Bot, Config);

    });

    Bot.on('disconnected', function() {

      that.onDisconnected({}, Bot, Config);

    });

    Bot.on('debug', function(rawEvent) {

      that.onDebug({
        'rawEvent': rawEvent
      }, Bot, Config);

    });

    Bot.on('message', function(user, userID, channelID, message, rawEvent) {

      that.onMessage({
        'user': user,
        'userID': userID,
        'channelID': channelID,
        'message': message,
        'rawEvent': rawEvent
      }, Bot, Config, Helpers);

    });

    Bot.on('presence', function(user, userID, status, rawEvent) {

      that.onPresence({
        'user': user,
        'userID': userID,
        'status': status,
        'rawEvent': rawEvent
      }, Bot, Config, Helpers);

    });

  },

  onError: function(data, Bot, Config) {

    throw new Error(data.err);

  },

  onReady: function(data, Bot, Config) {

    console.success('Le bot est connecté.');

    InternalEvents.emit('connected');

    this.State.connected = true;
    this.State.connection = false;

  },

  onDisconnected: function(data, Bot, Config) {

    console.warn('Le bot à été déconnecté');

    if(this.State.disconnection == true)
      return;

    if(Config.autoReconnect != true)
      return;

    console.info('Le bot sera automatiquement reconnecté ...');

    this.State.connected = false;
    this.State.connection = true;

    InternalEvents.emit('connection');

    Bot.connect();

  },

  onDebug: function(data, Bot, Config) {

    if(!Config.debug)
      return;

    console.log(
      'debug:',
      '\n',
      data.rawEvent
      );

  },

  onMessage: function(data, Bot, Config, Helpers) {

    this.filters(data, Bot, Config, Helpers);
    this.commands(data, Bot, Config, Helpers);

  },

  onPresence: function(data, Bot, Config, Helpers) { 

    //this.database(data, Bot, Config, Helpers);

  },

  commands: require('./commands'),
  filters: require('./filters'),
  database: require('./db'),

{'fraction_non_alphanumeric': 0.15895765472312703, 'fraction_numerical': 0.0, 'mean_word_length': 2.4788519637462234, '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': '6148141', 'n_tokens_mistral': 1522, 'n_tokens_neox': 1422, 'n_words': 313}