From ec3531d227c9de46da8ae3578b67bc62189ae0b4 Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Thu, 23 Apr 2015 21:50:38 +0200 Subject: [PATCH] fix --- scripts/agenda.coffee | 2 +- scripts/misc.coffee | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/agenda.coffee b/scripts/agenda.coffee index 7963d57..2e85847 100644 --- a/scripts/agenda.coffee +++ b/scripts/agenda.coffee @@ -40,7 +40,7 @@ cosaCePerIl = (day,res) -> else res.send "ecco cosa c'è per doma: "+data.join('; ') module.exports = (robot) -> - robot.hear "cosa c'è per domani?", (res) -> + robot.hear /cosa c'è per domani?/i, (res) -> cosaCePerIl moment().add(1, 'days').format('YYYY-MM-DD'), res robot.hear /cosa c'è per il (\d+-\d+-\d+)/i, (res) -> cosaCePerIl res.match[1], res diff --git a/scripts/misc.coffee b/scripts/misc.coffee index edebe03..d1b5e28 100644 --- a/scripts/misc.coffee +++ b/scripts/misc.coffee @@ -14,6 +14,8 @@ module.exports = (robot) -> robot.respond /grazie/i, grazie robot.respond /ringraziamenti/i, (res) -> res.send 'voi teneroni mi avete ringraziato ' + (robot.brain.get('ringraziato') or 0) + ' volte :)' + robot.respond /saluta (\w+)/i, (res) -> + res.send 'ciao ' + res.match[1] robot.respond /dove sei/i, (res) -> robot.http('http://canihazip.com/s') .get() (err, r, body) ->