hi,
I just started writing a bot that joins and listens on all my team's channels. however, according to https://api.slack.com/bot-users there doesn't seem to be an option for bots to join channels (other than #general). 鈥斅爋r am I missing s.th. here?
freder
Bot users need to be invited to channels. If you say @yourbotusername you will get a dialog to invite him/her/it.
The list of methods available to bot users is at the bottom of: https://api.slack.com/bot-users. Not sure why channel.join is prohibited to bots...
No, bots cannot join channels by themselves. This is something we're talking about changing in the future but we have no firm plans yet.
We're tracking that as a bug inside Slack, so I'm going to close this out here. We'll make an announcement on the SlackAPI twitter account if this situation changes...
I seemingly cannot post "complex messages" as a bot user.
I'd love to be able to have a bot user call a slash command. I'm not sure if this is possible with complex messages, but I ran into errors while trying.
The bot docs say (with original bolding):
To post more complex messages as a bot user, clients can use the Web API methodchat.postMessage. Be sure and set as_user to true and use your bot user token.
And yet when I set this field:
{ ok: false, error: 'not_in_channel' }
When I try to join the channel:
{ ok: false, error: 'user_is_bot' }
Is adding bots to individual channels still not supported? The bot I integrated sends messages to "slackbot" only. Inviting the bot as you'd invite members does not seem to work.
Sad that this is not supported while coding for the Global Legal Hackathon, 2018, in Chicago.
One could argue that it's part of the slack security model. Because bots may not be trusted (e.g. a third party app), allowing them to join any channel (even public) and read history is not desirable.
Bot users need to be invited to channels. If you say
@yourbotusernameyou will get a dialog to invite him/her/it.
I wanted to ask how do i disable the bot being added to channels . Is this possible ? Also is there a way i can edit the dialog that comes up when i say @botusername . Thanks! @evansolomon
@AashrithChilkepalli nope, unfortunately you cannot prevent the bot from joining a channel programmatically. this is something we're aware of as something users need, but we don't have a built in solution for this yet.
i have a workaround suggestion: you can make your bot completely non-functional in channels it doesn't recognize. in addition, when it joins a channel it shouldn't be in, you can post a message telling the channel that it won't work there and asking a human user to please /kick itself so that it can leave.
This restriction is supposedly lifted, but if I call the conversations.join method using a bot token, I get:
{
"ok": false,
"error": "not_allowed_token_type"
}
@alper
{
"ok": false,
"error": "not_allowed_token_type"
}
do not use xoxp-xxxxxxxxxxx-x-xx-xx token
use xoxb-xxxx-x-x--x-x-x-x
Every time when you will create a bot user or allocate some event subscriptions to a bot, Slack notify you in slack app. You w'll need to manually add this app/bot to specific channel where you want to auto reply or you want to perform any activity :)

@alper Did you mean that the "bots can't join channels using conversation.join" restriction is lifted? If so can you point me to where you found that info? It's not working for me, but the message I get is that the bot is already in the channel, which is not right =)
Most helpful comment
Bot users need to be invited to channels. If you say
@yourbotusernameyou will get a dialog to invite him/her/it.