More Related Content
Similar to Goodpatchに生息するbotたち (20)
Goodpatchに生息するbotたち
- 36. Hubotのサンプルコード
module.exports = (robot) ->
###
「hubot おはよう」 と投稿されると「Hello」とこたえる
###
robot.respond /おはよう!/i, (res) ->
res.send "Hello!"
###
「おはよう」 と投稿されると「Hello」とこたえる
###
robot.hear /おはよう/i, (res) ->
res.send "Hello!"