 #
 sentiment = require 'sentiment'
 _ = require 'underscore'
-
-module.exports = (robot) ->
+INIT_TIMEOUT = (if process.env.HUBOT_REACT_INIT_TIMEOUT then parseInt(process.env.HUBOT_SENTIMENT_BRAIN_INIT_TIMEOUT) else 10000)
+
+start = (robot) ->
   # helper method to get the week of the year in numeric form
   getWeekOfYear = (dateObj = new Date()) ->
     onejan = new Date(dateObj.getFullYear(), 0, 1)

  robot.respond /where( i|')s( the)? (sadness|stress)\??/i, (msg) ->
    # responds in the current channel
    msg.send getSadChannels(10)

#   Michi Kono
#   Will Barksdale
#
# Configuration:
#   HUBOT_SENTIMENT_BRAIN_INIT_TIMEOUT=N - wait for N milliseconds for brain data to load from redis. (default 10000)
# Notes:
#   Requires underscore and sentiment NPM modules
#
