Skip to content

Instantly share code, notes, and snippets.

@michikono
Created November 15, 2014 19:00
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 michikono/bbe31d12e0f9eaadd413 to your computer and use it in GitHub Desktop.
Save michikono/bbe31d12e0f9eaadd413 to your computer and use it in GitHub Desktop.
jaja.coffee
# Description:
# A script to translate laughter to Argentina's native language
#
# Notes:
# :)
#
# Author:
# Michi Kono
module.exports = (robot) ->
robot.hear /(ha[ha]+)/i, (msg) ->
if msg.message.room == 'argentina'
msg.send 'Ahem: ' + msg.match[1].replace(/h/g, 'j').replace(/H/g, 'J')
robot.hear /\blol\b/i, (msg) ->
if msg.message.room == 'argentina'
msg.send 'Ahem: ¡JAJAJA!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment