I have an app in Slack that sends direct messages to users. The messages always show up in the Slackbot channel and I would like to know if it is possible for the messages to show in the bot's own channel instead.
The app is made using bolt for NodeJS and here is my code:
app.client.chat.postMessage({
channel: userSlackId,
text: `TEXT HERE `,
token: process.env.SLACK_BOT_TOKEN,
icon_emoji: ":emoji",
username: "Incident Bot",
});
My scopes are:
chat:write
chat:write.customize
users:read
I believe you need the im:write scope as well to enable your app to directly message users.
You can update scopes from your app page -> OAuth & Permissions -> scroll down to scopes.