<commit_before>var Bot = require('./Slackbot.js');

var bot = Bot();

bot.init();

bot.startRTM({
  team: {
    token: process.env.token
  }
});

bot.hears(['hello'],'direct_message,direct_mention',function(connection,message) {
  bot.reply(connection,message,'Hello!');
});

bot.hears(['lunch'],'direct_message,direct_mention',function(connection,message) {
  bot.startTask(connection,message,function(task,convo) {
    convo.ask('Say YES or NO',{
        'yes': {
          callback: function(response) { convo.say('YES! Good.'); },
          pattern: bot.utterances.yes,
        },
        'no': {
          callback: function(response) { convo.say('NO?!?! WTF?'); },
          pattern: bot.utterances.no,
        },
        'default': function(response) { convo.say('Huh?'); convo.repeat(); }
    });
  });
});<commit_msg>fix syntax of example<commit_after>var Bot = require('./Slackbot.js');

var bot = Bot();

bot.init();

bot.startRTM({
  team: {
    token: process.env.token
  }
});

bot.hears(['hello'],'direct_message,direct_mention',function(message) {
  bot.reply(message,'Hello!');
});

bot.hears(['question','ask'],'direct_message,direct_mention',function(message) {
  bot.startConversation(message,function(convo) {
    convo.ask('Say YES or NO',[
        {
          callback: function(response) { convo.say('YES! Good.'); convo.next(); },
          pattern: bot.utterances.yes,
        },
        {
          callback: function(response) { convo.say('NO?!?! WTF?'); convo.next(); },
          pattern: bot.utterances.no,
        },
        {
          default: true,
          callback:function(response) { convo.say('Huh?'); convo.repeat();  convo.next(); }
        }
    ]);
  });
});
{'fraction_non_alphanumeric': 0.1984732824427481, 'fraction_numerical': 0.0, 'mean_word_length': 3.1359223300970873, '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': '2312152', 'n_tokens_mistral': 569, 'n_tokens_neox': 563, 'n_words': 79}