Accept an array of patterns for message matching
Description
In the docs, there seems to only be support for a single pattern to match and then do an action:
app.message(':wave:', async ({ message, say}) => {
say(`Hello, <@${message.user}>`);
});
I'd like to be able to supply multiple patterns to match different ways of saying the same command without having to duplicate that block of code. See other chatbots like Alexa where you supply many invocations for a single command.
What type of issue is this? (place an x in one of the [ ])
- [ ] bug
- [x] enhancement (feature request)
- [ ] question
- [ ] documentation related
- [ ] testing related
- [ ] discussion
Requirements (place an x in each of the [ ])
- [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
- [x] I've read and agree to the Code of Conduct.
- [x] I've searched for any related issues and avoided creating a duplicate issue.
Seconding this - especially when trying to make bots more conversational, passing multiple messages to trigger on would be wonderful.
#761 was not a solution for this
As the list of the middleware is also an array, supporting an array of string | regexp is not so simple.