Last active
August 29, 2015 14:09
-
-
Save shokai/de030fc88c64cf9850a9 to your computer and use it in GitHub Desktop.
hubot script UX1000円
This file contains 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
# 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