Last active
October 19, 2016 04:47
-
-
Save sota1235/8ceddfeea52c13dce37b98085fa380b8 to your computer and use it in GitHub Desktop.
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
module.exports = (robot) -> | |
# hubot hogeコマンドに反応する | |
robot.respond /^hoge$/i, (msg) -> | |
msg.send 'hoge' # hubotに喋らせる | |
# 全発言の中から正規表現にマッチしたものに反応する | |
robot.hear /^(.+)$/, (msg) -> | |
msg.send 'fuga' | |
# 'hoge'というkey nameで'fuga'を保存 | |
robot.brain.set 'hoge', 'fuga' | |
# 'hoge'というkey nameのデータを取得 | |
robot.brain.get 'hoge' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment