Skip to content

Instantly share code, notes, and snippets.

@shokai
Last active August 29, 2015 14:09
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 shokai/de030fc88c64cf9850a9 to your computer and use it in GitHub Desktop.
Save shokai/de030fc88c64cf9850a9 to your computer and use it in GitHub Desktop.
hubot script UX1000円
# Description:
# UXと言われたら1000円と返す
#
# Author:
# @shokai
module.exports = (robot) ->
reply = (msg) ->
who = msg.message.user.name
count = (robot.brain.get(who) or 0) + 1
robot.brain.set who, count
msg.send "@#{who} UX#{count*1000}円"
robot.hear /ux/i, reply
register_censor = (word) ->
robot.hear new RegExp( word.split('').join('.*'), 'i' ), reply
register_censor 'ユザエクスペリエンス'
register_censor 'ユザ体験'
register_censor 'ユエックス'
register_censor 'userexperience'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment