Accept an array of patterns for message matching
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 445
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 28
Description
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
- enhancement (feature request)
- question
- documentation related
- testing related
- discussion
Requirements (place an x in each of the [ ])
- I've read and understood the Contributing guidelines and have done my best effort to follow them.
- I've read and agree to the Code of Conduct.
- I've searched for any related issues and avoided creating a duplicate issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the app.message('👋', ...) entry point and the message-matching documentation shown in the issue. Determine how one handler currently receives a single pattern, then verify that multiple patterns can invoke the same handler without duplicated blocks. Done means the documented matching behavior supports several invocation patterns and existing behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100