Skip to content

Accept an array of patterns for message matching #281

@BenAlderfer

Description

@BenAlderfer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions