Skip to content

Instantly share code, notes, and snippets.

@fivetanley
Created January 25, 2012 18:34
Show Gist options
  • Save fivetanley/1677783 to your computer and use it in GitHub Desktop.
Save fivetanley/1677783 to your computer and use it in GitHub Desktop.
That's What She Said Hubot script
#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