<commit_before>var login = require('facebook-chat-api');
var command = require('./lib/command.js');
var config = require('./lib/config.js');

login(config.FACEBOOK, function callback(err, api) {
  if (err) return console.error(err);

  api.listen(function callback(err, event) {

    switch (event.type) {
      case 'message':
        if (event.body === '#chat') {
          command.doChat(event, function(err, success) {
          });
        } else if (event.body === '#invite') {
          command.doInvite(event, api);
        } else if (event.body === '#leave') {
          command.doLeave(event, api);
        } else if (event.body === '#next') {
          command.doNext();
        }

        break;
      case 'event':
        console.log(event);
        break;
    }

  });
});<commit_msg>fix index.js<commit_after>var login = require('facebook-chat-api');
var command = require('./lib/command.js');
var config = require('./lib/config.js');

login(config.FACEBOOK, function callback(err, api) {
  if (err) return console.error(err);

  api.listen(function callback(err, event) {

    switch (event.type) {
      case 'message':
        if (event.body === '#chat') {
          command.doChat(event, function(err, success) {
          });
        } else if (event.body === '#invite') {
          command.doInvited(event, api);
        } else if (event.body === '#leave') {
          command.doLeave(event, api);
        } else if (event.body === '#next') {
          command.doNext();
        }

        break;
      case 'event':
        console.log(event);
        break;
    }

  });
});
{'fraction_non_alphanumeric': 0.17709637046307886, 'fraction_numerical': 0.0, 'mean_word_length': 2.2833675564681726, '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': '1383189', 'n_tokens_mistral': 492, 'n_tokens_neox': 483, 'n_words': 105}