Skip to content

Instantly share code, notes, and snippets.

@hiroqn
Last active August 29, 2015 14:15
Show Gist options
  • Save hiroqn/1a46ec41337dc148287b to your computer and use it in GitHub Desktop.
Save hiroqn/1a46ec41337dc148287b to your computer and use it in GitHub Desktop.
module.exports = (robot) ->
prevMessage = {}
robot.hear /(.*)/, (msg) ->
room = msg.message.room
prev = prevMessage[room]
prevMessage[room] = msg.match[1]
if msg.match[1] is 'まだ'
return msg.send 'ここにない'
if prev is 'まだ' and msg.match[1] is '出会い'
msg.send ':recruit:'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment