-
Notifications
You must be signed in to change notification settings - Fork 838
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
Duplicate events with WebClient and direct messages #801
Comments
I'm afraid that your app might not respond to requests from Slack within 3 seconds.
https://api.slack.com/events-api#the-events-api__responding-to-events Unfortunately, the As a better solution, we are actively working on a new package - slack-bolt. https://pypi.org/project/slack-bolt/ This new framework provides a much easier way to deal with this issue. A good thing is that you can use it along with the Flask framework (actually with any frameworks).
Bolt for Python it's still in alpha but it should already work fine for most cases. That said, if you're not comfortable with trying slack-bolt's alpha version releases out, please make sure if your code in the Flask app always returns HTTP status within 3 seconds and/or consider using multi threads/processes to deal with the issue. |
Thank you very much for your detailed answer.
Thanks for the great work on this |
(Filling out the following details about bugs will help us solve your issue sooner.)
The Slack SDK version
slackclient==2.8.2
Python runtime version
Python 3.6.12
OS info
#108~16.04.1-Ubuntu
Steps to reproduce:
I am trying to build a bot that will respond to direct messages. Thus, I have followed the tutorial. These are parts of my code:
Then, when I go on Slack and send a direct message to the bot.
Expected result:
I should have only one answer ("Hello you" in this case)
Actual result:
But, the received events are duplicated. When printing the events, I see multiple times the same event and so, the responses from the bots are duplicated.
My goal is to only have one message for each request.
Thank you very much in advance.
The text was updated successfully, but these errors were encountered: