Skip to content

Commit

Permalink
Added the magic eight ball
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Resella authored and jonmagic committed Oct 27, 2011
1 parent 9bdeae7 commit f130172
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/scripts/eight-ball.coffee
@@ -0,0 +1,33 @@
# The Magic Eight ball
#
# eightball <query> - Ask the magic eight ball a question
#

ball = [
"It is certain",
"It is decidedly so",
"Without a doubt",
"Yes – definitely",
"You may rely on it",
"As I see it, yes",
"Most likely",
"Outlook good",
"Signs point to yes",
"Yes",
"Reply hazy, try again",
"Ask again later",
"Better not tell you now",
"Cannot predict now",
"Concentrate and ask again",
"Don't count on it",
"My reply is no",
"My sources say no",
"Outlook not so good",
"Very doubtful",
]

module.exports = (robot) ->
robot.respond /(eightball|8ball)(.*)/i, (msg) ->
msg.send msg.random ball


0 comments on commit f130172

Please sign in to comment.