Skip to content

Instantly share code, notes, and snippets.

@Gohan
Created February 25, 2012 15:24
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 Gohan/1909063 to your computer and use it in GitHub Desktop.
Save Gohan/1909063 to your computer and use it in GitHub Desktop.
# hello hubot, 回音体演示
fs = require 'fs'
module.exports = (robot) ->
robot.respond /(回音体) (.*)/i, (msg) ->
@output = ['主人, 回音体就来啊~']
@origin = msg.match[2]
for i in [0..@origin.length-1]
@output.push @origin.substring i
msg.send @output.join('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment