fix punto di domanda in memoria

This commit is contained in:
Enrico Fasoli 2015-04-24 12:05:59 +02:00
parent 7abec91916
commit 99824a9ac2

View File

@ -17,7 +17,7 @@ module.exports = (robot) ->
delete mem[m]
robot.brain.set 'memoria', mem # necessary?
else res.send 'non so cosa sia'
robot.respond /(?:che )?((?:(?:(?:(?:cos|qual)\'è)|chi (?:sono|è)?))|(?:quali|cosa) sono) (.+)(?:\?)?/i, (res) ->
robot.respond /(?:che )?((?:(?:(?:(?:cos|qual)\'è)|chi (?:sono|è)?))|(?:quali|cosa) sono) ([\w ]+)(?:\?)?/i, (res) ->
mem = robot.brain.get('memoria') or {}
arg = (res.match[2] or res.match[1]).toLowerCase()
verbo = res.match[1].toLowerCase().split(/[' ]/i)