Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from slacker to slack-sdk #228

Closed
wants to merge 7 commits into from

Conversation

jacobtruman
Copy link

@jacobtruman jacobtruman commented Dec 20, 2021

A newly created legacy bot token fails to authenticate using the older auth method used by the slacker module. The rtm.start method has also been deprecated, so migrated to rtm.connect. The slack-sdk module also provides blocks support.

Resolves #227.
Resolves #210.
Resolves #209.

@amuraru
Copy link

amuraru commented Dec 23, 2021

+1

amuraru added a commit to amuraru/slackbot that referenced this pull request Dec 23, 2021
slackbot/slackclient.py Outdated Show resolved Hide resolved
@amuraru
Copy link

amuraru commented Dec 23, 2021

@jacobtruman this is promising. I tested it with my own bot and encountered an issue though:

the bot enters an infinite loop due to rtm websocket disconnect:

2021-12-23 19:41:11,009 - slackbot.slackclient - WARNING - reconnected to slack rtm websocket
2021-12-23 19:41:16,020 - slackbot.slackclient - WARNING - lost websocket connection, try to reconnect now

Should we look into using the RTMClient instead?
https://slack.dev/python-slack-sdk/real_time_messaging.html#real-time-messaging-rtm

@jacobtruman
Copy link
Author

@jacobtruman this is promising. I tested it with my own bot and encountered an issue though:

the bot enters an infinite loop due to rtm websocket disconnect:

2021-12-23 19:41:11,009 - slackbot.slackclient - WARNING - reconnected to slack rtm websocket
2021-12-23 19:41:16,020 - slackbot.slackclient - WARNING - lost websocket connection, try to reconnect now

Should we look into using the RTMClient instead? https://slack.dev/python-slack-sdk/real_time_messaging.html#real-time-messaging-rtm

@amuraru good catch - is this something easily duplicated, so that I can properly test it?

@jacobtruman
Copy link
Author

@jacobtruman this is promising. I tested it with my own bot and encountered an issue though:

the bot enters an infinite loop due to rtm websocket disconnect:

2021-12-23 19:41:11,009 - slackbot.slackclient - WARNING - reconnected to slack rtm websocket
2021-12-23 19:41:16,020 - slackbot.slackclient - WARNING - lost websocket connection, try to reconnect now

Should we look into using the RTMClient instead? https://slack.dev/python-slack-sdk/real_time_messaging.html#real-time-messaging-rtm

@amuraru I was able to duplicate this issue and added a ping to the parse user and channel data methods to prevent websocket disconnect. I am looking into implementing using RTMClient, but it looks like it might be a pretty hefty rewrite - I still think it is a good idea and am still experimenting with it.

@jacobtruman
Copy link
Author

closing in favor of #229 under feature branch

@jacobtruman jacobtruman closed this Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants