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

var bot = Bot({
  debug: true,
  path: './teams/',
  clientId: process.env.clientId,
  clientSecret: process.env.clientSecret,
  port: process.env.port,
});

bot.on('ready',function() {

  bot.setupWebserver(function(err,webserver) {
    bot.createHomepageEndpoint(bot.webserver);
    bot.createOauthEndpoints(bot.webserver);
    bot.createWebhookEndpoints(bot.webserver);
  });

  bot.findTeamById('T024F7C87',function(err,connection) {

    bot.startRTM(connection);

  })

  setInterval(function() {
    bot.tick();
  },1000);


});

bot.init();


bot.on('slash_command',function(connection,message) {

  if (message.command=='/botkit') {

    // just respond with this
    connection.res.send('OK!')
    bot.reply(connection,message,'<@' + message.user + '> touched my slash command!!');

  } else {
    connection.res.send('Unknown command!');
  }

  return false;

});


bot.on('outgoing_webhook',function(connection,message) {

  connection.res.json({
    text: 'Oh.',
  });
<commit_msg>mix straight slash command response with bot saying something using rtm<commit_after>var Bot = require('./Slackbot.js');

var bot = Bot({
  debug: true,
  path: './teams/',
  clientId: process.env.clientId,
  clientSecret: process.env.clientSecret,
  port: process.env.port,
});

bot.on('ready',function() {

  bot.setupWebserver(function(err,webserver) {
    bot.createHomepageEndpoint(bot.webserver);
    bot.createOauthEndpoints(bot.webserver);
    bot.createWebhookEndpoints(bot.webserver);
  });

  bot.findTeamById('T024F7C87',function(err,connection) {

    bot.startRTM(connection);

  })

  setInterval(function() {
    bot.tick();
  },1000);


});

bot.init();


bot.on('slash_command',function(connection,message) {

  if (message.command=='/botkit') {

    // just respond with this
    connection.res.send('Ouch!')
    bot.reply(connection,message,'<@' + message.user + '> touched my slash command!!');

  } else {
    connection.res.send('Unknown command!');
  }

  return false;

});


bot.on('outgoing_webhook',function(connection,message) {

  connection.res.json({
    text: 'Oh!',
  });

{'fraction_non_alphanumeric': 0.17286245353159851, 'fraction_numerical': 0.00929368029739777, 'mean_word_length': 4.126190476190477, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6907793', 'n_tokens_mistral': 765, 'n_tokens_neox': 721, 'n_words': 110}