'use strict';

var exec = require('child_process').exec;

module.exports = function() {};

// function reboot(slack, args, message) {
//   var channel = slack.getChannelGroupOrDMByID(message.channel);
//   channel.send('codybot is going down and hopefully coming back up.');
//   exec('pm2 restart codybot', function (err, stdout, stderr) {
//     console.error(err);
//     console.error(stderr);
//     console.log(stdout);
//   });
//   // console.log(message._client.channels.C0LFUN4F2.name);
// }

@@ -80,46 +80,91 @@
 tion
-() %7B%7D;%0A%0A// function reboot(slack, args
+ reboot(controller) %7B%0A  controller.hears('reboot', %5B'direct_mention'%5D, function(bot
 , me
@@ -176,93 +176,31 @@
 ) %7B%0A
-//
    
-var channel = slack.getChannelGroupOrDMByID(message.channel);%0A//   channel.send(
+ bot.reply(message, 
 'cod
@@ -251,18 +251,17 @@
  up.');%0A
-//
+ 
    exec(
@@ -316,18 +316,17 @@
 derr) %7B%0A
-//
+ 
      con
@@ -338,26 +338,25 @@
 error(err);%0A
-//
+ 
      console
@@ -371,18 +371,17 @@
 tderr);%0A
-//
+ 
      con
@@ -402,19 +402,17 @@
 t);%0A
-//
+ 
    %7D);%0A
-//
+ 
    /
@@ -467,13 +467,15 @@
 .name);%0A
-// 
+  %7D)%0A
 %7D%0A

update reboot with botkit