0

I'm using a slash command in a DM and getting the following error message from Slack:

{'ok': False, 'error': 'channel_not_found'}

My bot currently has the following scopes and is using the say function to send messages to the specified DM channel.

Here are the bot's scopes for reference:

app_mentions:read
channels:history
channels:join
channels:read
chat:write
chat:write.public
commands
groups:history
groups:read
im:history
im:read
im:write
incoming-webhook
mpim:history
mpim:read
mpim:write
mpim:write.invites
users.profile:read
users:read

I am unable to send the message through an ack because it's through a modal and needs to send to different channels sometimes (part of the prompt), another problem I am experiencing (does anyone know if my bot can join a private channel itself or smth?)

The line in question is below:

message = await say(channel=data["channel_block"]["event-rsvp-channel"]["selected_conversation"], blocks=block_data["blocks"])

2 Answers2

0

sorry if i'm late to the party! hope you figured this out.

your bot can't join a private channel unless it's already a member, and this includes DMs between two people - you would have to create a group message with person A, person B, and bot.

i would also use chat_postMessage instead of say.

0

If your channel is private, then you need to add the bot to your channel for the bot to be able to send messages. If you are intending to make the bot send messages to your private chat, then provide your user id instead of the channel name.