Skip to content

Instantly share code, notes, and snippets.

@spoike
Created March 9, 2015 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spoike/c74d6f82701e25f757c6 to your computer and use it in GitHub Desktop.
Save spoike/c74d6f82701e25f757c6 to your computer and use it in GitHub Desktop.
Ask hubot anything and it will consult the magic 8-ball
# Description:
# Hubot magic 8-ball
#
# Dependencies:
# magicball
#
# Configuration:
# None
#
# Commands:
# hubot x ? - Hubot checks your question with the magic 8-ball
#
# Author:
# spoike
magicball = require 'magicball'
module.exports = (robot) ->
robot.respond /(.*)\?$/i, (msg) ->
msg.reply "Ball reads: _\"#{magicball.ask()}\"_"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment