getgort / gort

Gort is a chatbot framework designed from the ground up for chatops.

Home Page:https://guide.getgort.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add "trigger" support to respond to non-command text

clockworksoul opened this issue · comments

Currently Gort only responds to explicit commands, formatted like structured commands. There should be some kind of ability to respond to non-command text, sort of like Slack "triggers" (but not like Cog "triggers", which are very different).

Triggers would be configured with a pattern to match and a command, so when Gort sees text matching the defined pattern, it executes the command.

  • Open question: How will it behave wrt to trigger text + command inputs?

    • Should input be passed through to the command parser? Maybe set as an envvar?
  • What if a command also matches a trigger? Which takes precedence?

    • Execute triggers only if there’s no matching command?
    • Execute trigger and stop processing (so command never executes)?
    • Either of the above/configurable per trigger?
  • What about timed triggers (maybe use cron definitions)?

@clockworksoul Given the above commit can this be closed? Or was there follow up work needed?

As discussed "in-person" this will need documenting.