Permalink
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (21 sloc) 462 Bytes
# Description:
# "Makes your Hubot even more Clever™"
#
# Dependencies:
# "cleverbot-node": "0.2.1"
#
# Configuration:
# None
#
# Commands:
# hubot c <input>
#
# Author:
# ajacksified
# Stephen Price <steeef@gmail.com>
cleverbot = require('cleverbot-node')
module.exports = (robot) ->
c = new cleverbot()
robot.respond /c (.*)/i, (msg) ->
data = msg.match[1].trim()
cleverbot.prepare(( -> c.write(data, (c) => msg.send(c.message))))