scrapinghub / slackbot

A chat bot for Slack (https://slack.com).
MIT License
1.26k stars 396 forks source link

Recognize multiple times in one message #145

Open oz-linden opened 7 years ago

oz-linden commented 7 years ago

I'd like to have my bot be able to respond more than once to a single message. Example: given a list of bug identifiers, send status and summary information for each. I'd like recognizer like '\b((?:SL|BUG)-\d+)\b' to invoke the method more than once for a single message, like this:

Oz: what is up with SL-300 and BUG-1000 ? Bot: SL-300 [Open] Shiny new feature for Second Life BUG-1000 [Closed] Irritating odd thing that happens

josegonzalez commented 7 years ago

@oz-linden can you not call message.reply twice?

jtatum commented 7 years ago

@oz-linden, As @josegonzalez points out, this is doable by reading message.text and matching your regex again inside your handler. That said, it might be an interesting enhancement.

josegonzalez commented 7 years ago

@oz-linden how do you expect the interface for this feature request to look?