Bot echoing more than once

In the video itself it can be seen that the bot sends back messages even without receiving any messages for the same. It is echoing the previously sent messages again and again if my python script is running and my engrok server is also running. The bot is continuously sending back previously sent messages again and again without receiving anything.

What is the issue with the same? Is it because we are creating the bot in the global scope now?

Hi @A18ML0031

Creating the bot in the global scope isn’t the problem. Share your code and I’ll look into it.

My guess is that you have not returned any response from the one or more Flask routes. Just return a simple return "OK" and see if that resolves the issue.

Yes. My code was missing a return statement in the webhook function in the Flask route. Thanks

1 Like