slackapi / slackapi/bolt-js

Accept an array of patterns for message matching

Open
#281 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement semver:minor
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.