scrapinghub/slackbot

Any plan to change to rtm.connect() ?

a0149659 opened this issue · 5 comments

I used this bot for a while, its an awesome project, however not usable with Slack Enterprise as it requires rtm.connect()

Thank you for your hard work @lins05 I really enjoyed your slackbot.

can you explain a bit about rtm.connect ?

@lucywang000 Slackbot uses rtm.start() to initiate the slack.com API. Which gathers a bunch of info upon start, this is fine for basic workspaces. However for Enterprise Workspaces rtm.start is not allowed and rtm.connect is recommended by slack, which is more specific in regards of the information the bot its requesting. Causing slackbot to get a 500 error when attempting to connect to an Enterprise workspace. Here's slack's doc on it https://api.slack.com/rtm#connecting_with_rtm.connect_vs._rtm.start

Ive tried to change rtm.start to rtm.connect, and it connects to slack, but there's some user, channel, group, etc parsing that needs quite a bit of polishing up.

hemna commented

Should switch over to using slack_sdk for talking to the slack API.
https://github.com/slackapi/python-slack-sdk

Thanks all for the discussion. This is fixed in bfdbef9.