From c2569b8bf4a6b308b68f30eff8af00335134d392 Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Fri, 24 Apr 2015 19:38:50 +0200 Subject: [PATCH] aggiunta risposta ai saluti come richiesto in #1 --- scripts/misc.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/misc.coffee b/scripts/misc.coffee index a328273..22c6ce3 100644 --- a/scripts/misc.coffee +++ b/scripts/misc.coffee @@ -38,4 +38,8 @@ module.exports = (robot) -> res.send 'sto parlando in '+res.message.room+', '+res.message.user.name robot.respond /ti amo/i, (res) -> res.send 'anche io ti amo '+(res.message.user.name+' ' or '')+'<3' + robot.hear /(?:ehi|ciao|(?:bella(?: li)?)) (?:asjon|assa|assion(?:i|e))(?:!)?/, (res) -> + console.log res.match + saluti = ['ciao', 'bella', 'รจ arrivato', 'eccolooo', 'dimmi'] + res.send res.random(saluti)+' '+res.message.user.name+'!' robot.respond /secret-kill-code/i, (res) -> process.exit 0