问题
Bots cannot use the regular channels.leave
API call, so how do I make a bot leave a channel, short of kicking it? I need it to leave a channel where I do not have rights to kick users.
回答1:
You can /remove
(or /kick
) the bot.
Type /kick @botname
in the channel which you want the bot to leave.
回答2:
If you are asking about Slackbot in particular, you cannot remove it from a channel (see Slack's response to this question).
If you have permission to delete Slackbot's responses, you can install this bot, which will delete Slackbot's automated responses for you.
来源:https://stackoverflow.com/questions/38209815/how-do-i-make-a-slack-bot-leave-a-channel