botman / driver-slack

BotMan Slack Driver
MIT License
51 stars 54 forks source link

Multiple reply in slack bot #61

Open myselfronin opened 3 years ago

myselfronin commented 3 years ago

When I hit a command on my slack app. Its getting multiple replies from the bot. I am using ngrok while developing and I can see the slack is sending multiple request. I couldn't fix this ,whether its from my botman app or the slack app. Has anyone faced this issue. The code is just the one that we get from fresh botman install. In tinker its working fine.

myselfronin commented 3 years ago

I am embarrassed with my question, It was already mentioned in the documentation. But also if anyone missed it. If you're using ngrok be aware that Slack has a timeout of 3 seconds. When using ngrok, depending on your location and connection speed, the time it takes for Slack to get a 200 OK can be longer than 3 seconds. In such cases you'll notice that your bot will answer multiple times. If you're facing this issue a possible solution is to deploy your bot to a production server or try to change the ngrok server location.