Created
January 25, 2012 18:34
-
-
Save fivetanley/1677783 to your computer and use it in GitHub Desktop.
That's What She Said Hubot script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires twss.js by Daniel Rapp. npm install -g twss | |
twss = require('twss') | |
module.exports = (robot) -> | |
robot.respond /twss\s*(.*)?$/i, (msg)-> | |
query = msg.message.text.split(" ") | |
shesaid = "" | |
for said in query | |
if said not in query[0..1] | |
shesaid += said + " " | |
username = msg.message.user.name | |
if twss.is shesaid | |
msg.send "@" + username + ": That's what she said." | |
else | |
msg.send "@" + username + ": That's not what she said." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment