Description
As with Bolt for jS, the app.message handler should provide context.matches to listener functions.
app.message(/^(hi|hello|hey).*/, async ({ context, say }) => {
// RegExp matches are inside of context.matches
const greeting = context.matches[0];
await say(`${greeting}, how are you?`);
});
https://github.com/slackapi/bolt-js/blob/%40slack/bolt%402.2.3/docs/_basic/listening_messages.md#using-a-regexp-pattern
Category (place an x in each of the [ ])
Requirements (place an x in each of the [ ])
Description
As with Bolt for jS, the
app.messagehandler should providecontext.matchesto listener functions.https://github.com/slackapi/bolt-js/blob/%40slack/bolt%402.2.3/docs/_basic/listening_messages.md#using-a-regexp-pattern
Category (place an
xin each of the[ ])Requirements (place an
xin each of the[ ])