var Botkit = require('botkit');

var controller = Botkit.slackbot({
    debug: false
});

controller.spawn({
    token: process.env.token || ''
}).startRTM(function(err) {
    if (err) {
        throw new Error(err);
    }
});

controller.hears(['hello', 'hi'], ['direct_message', 'direct_mention', 'mention'],
    function(bot, message) {
        bot.reply(message, 'Hello yourself.');
    }
);

controller.on('direct_mention', function(bot, message) {
    bot.reply(message, 'I heard you mention me!');
});

@@ -157,24 +157,25 @@
 function
+ 
 (err) %7B%0A
     if (
@@ -162,24 +162,24 @@
 ion (err) %7B%0A
-
     if (err)
@@ -309,32 +309,33 @@
 '%5D,%0A    function
+ 
 (bot, message) %7B
@@ -432,16 +432,17 @@
 function
+ 
 (bot, me
@@ -501,12 +501,210 @@
  me!');%0A%7D);%0A
+%0Acontroller.hears(%5B'random'%5D, %5B'direct_mention'%5D, function (bot, message) %7B%0A    bot.say(%0A        %7B%0A            text: 'Message to random channel',%0A            channel: '#random'%0A        %7D%0A    );%0A%7D);%0A

Add message to random channel