Duplicate messages after adding delay in custom function

I have a code in a custom action in which I am adding a delay for 30 secs and all rest of the call to that action are without the delay. After adding a delay, rasa sends multiple replies. Actually I was receiving multiple messages so in order to debug that the FB webhook is duplicating the message or rasa is duplicating messages, I added a delay. After adding a delay it seems like the message_id for Facebook is different on all duplicating messages. So it seems like rasa is duplicating. Is there any solution for that?

Could you share the code of your action? I wonder if there’s something async going awry.

Also, what’s the use-case for waiting 30 seconds?

This is one of four topics you have open for this question. Do not post duplicates. Closing this topic. @Emma