scrapinghub / slackbot

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

rtm.start response is changing - appears to be a breaking one #227

Closed 0xStarcat closed 1 year ago

0xStarcat commented 2 years ago

According to a new entry from slack it appears that on September 20th, 2022 the rtm.start() response will be truncated and become identical to the rtm.connect() response see docs

This response will be missing the users, channels, groups, and ims keys that this library uses on initialization of a new client

I believe these changes will break this client on that date. Is my analysis correct and if so, are there any plans to update this library to survive these changes?

lior-parsi commented 1 year ago

Hi Thank you for your work Do you know if this change is planned to be merged soon?

lins05 commented 1 year ago

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

daveluong commented 1 year ago

Hey @lins05 I'm using 1.0.1 released yesterday but still getting this error

Traceback (most recent call last):
  File "run.py", line 8, in <module>
    main()
  File "run.py", line 4, in main
    bot = Bot()
  File "/opt/bot/jobs/env/lib/python3.5/site-packages/slackbot/bot.py", line 27, in __init__
    'BOT_EMOJI') else None
  File "/opt/bot/jobs/env/lib/python3.5/site-packages/slackbot/slackclient.py", line 60, in __init__
    self.rtm_connect()
  File "/opt/bot/jobs/env/lib/python3.5/site-packages/slackbot/slackclient.py", line 65, in rtm_connect
    self.parse_slack_login_data(reply)
  File "/opt/bot/jobs/env/lib/python3.5/site-packages/slackbot/slackclient.py", line 88, in parse_slack_login_data
    self.parse_channel_data(self.list_channels())
  File "/opt/bot/jobs/env/lib/python3.5/site-packages/slackbot/slackclient.py", line 81, in list_channels
    return webapi_generic_list(self.webapi, 'conversations', 'channels')
  File "/opt/bot/jobs/env/lib/python3.5/site-packages/slackbot/slackclient.py", line 30, in webapi_generic_list
    response = getattr(webapi, resource_key).list(**args)
AttributeError: 'Slacker' object has no attribute 'conversations'
eduardobrazil commented 1 year ago

I faced the same error and realized I was using slacker 0.1.2.0.

The error went away after updating slacker to its latest (0.14.0) version.