From d2d6af3f3f9d966f35c5ed8c386e3029d215c5ec Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Fri, 24 Apr 2015 17:43:21 +0200 Subject: [PATCH] aggiunta funzione per memory dump (debug) --- scripts/memoria.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/memoria.coffee b/scripts/memoria.coffee index e1b6560..f7c5b62 100644 --- a/scripts/memoria.coffee +++ b/scripts/memoria.coffee @@ -23,6 +23,9 @@ module.exports = (robot) -> robot.brain.set 'memoria', mem # necessary? else res.send res.random nonso + robot.respond /memory-dump/i, (res) -> + res.send JSON.stringify robot.brain.get('memoria') + robot.respond /(?:che )?(?:(?:(?:(?:(cos|qual|quand)\'è)|(?:chi (sono|è)?)))|(?:quali|cosa) sono) ([\w- ]+)(?:\?)?/i, (res) -> query = undefined # Estrazione query (quand,cos,qual,chi...)