seratch / slack-edge

Slack app development framework for edge functions with streamlined TypeScript support
https://github.com/seratch/slack-edge-app-template
MIT License
87 stars 5 forks source link

Can't listen for all messages #31

Closed kcoderhtml closed 2 months ago

kcoderhtml commented 2 months ago

I would like to listen for all messages like you can do with @slack/bolt; I also can't figure out how to get the message specific context, but I may just be reading the doc wrong.

app.message(async ({ message }) => {
    // check if the message is from a bot
    if (message.subtype === undefined && message.user) {
        await onboardingStep(message.user, app.client, true);
    }
});
kcoderhtml commented 2 months ago

well i fixed the first part by using app.anyMessage instead; really should have noticed that

kcoderhtml commented 2 months ago

and now i figured out that you can get the message part from the payload variable