-
For both inside a script and across all scripts, how can I tell hubot/robot to stop parsing an incoming message? I'm looking to sometimes implement the behavior of "first match stops searching/parsing". module.exports = (robot) ->
robot.hear /no further/i, (res) ->
res.send "Will not parse further in this module"
# return from this module-exported method???
robot.hear /all stop/i, (res) ->
res.send "No more parsing in any modules"
# command??? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Found it: https://github.com/hubotio/hubot/blob/master/src/response.js#L132,L137 Just call |
Beta Was this translation helpful? Give feedback.
-
According to this check: Lines 312 to 320 in d0c13d2 You can have:
inside your listener callback. But this only works if your callbacks are not async, I think this is a major drawback of this architecture, it would be better if hubot could handle async. It's kinda of documented here https://github.com/hubotio/hubot/blob/d0c13d2d8cd1ba30dc7f8765778988ca5a4d00c9/docs/implementation.md#listeners |
Beta Was this translation helpful? Give feedback.
According to this check:
hubot/src/robot.js
Lines 312 to 320 in d0c13d2
You can have:
inside your listener callback.
But this only works if your callbacks are not async, I think this is a major drawback of this architecture, it would be better if…