scrapinghub / slackbot

A chat bot for Slack (https://slack.com).
MIT License
1.26k stars 396 forks source link

Any plan to change to rtm.connect() ? #209

Closed a0149659 closed 1 year ago

a0149659 commented 4 years ago

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

a0149659 commented 4 years ago

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

lucywang000 commented 4 years ago

can you explain a bit about rtm.connect ?

a0149659 commented 4 years ago

@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 3 years ago

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

lins05 commented 1 year ago

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