Expected behaviour:
- When I open direct message (DM) with my bot the im_open event should trigger.
Current behaviour:
- It does not trigger.
Steps I made:
I enabled the 'im:read' scope in 'OAuth & Permissions' as the link mention: https://api.slack.com/events/im_open
I added im_open event from 'Event Subscriptions' for Workspace and Bot User.
I re-installed the application.
I ensured other activated events work, just this doesn't.
I test it by simply opening the chat channel with the bot (open up the conversation/channel).
This is my code:
slackEvents.on('im_open', (event: any, body: any, headers: any) => {
console.log('Test'); // Doesn't work
});
slackEvents.on('message', (event: any, body: any, headers: any) => {
console.log('Test2'); // Works fine
});
I use the following library: https://www.npmjs.com/package/@slack/events-api