I am using google apps script to host my simple bot. Everything works fine. But out of a suddent in 3-4 days, my bot starts replying to the same message again and again unless i delete the webhook or archive my deployment on apps script.
Once i starts repeating - if i delete the webhook, it stops. but if i set the same webhook again, it starts again.
function doPost(e) {
try {
var content = JSON.parse(e.postData.contents);
reply_to_bot(content);
}
catch(e) {
Logger.log("Error: " + error);
}
}
the reply_to_bot function simply processes the commands and sends responses back to the bot accordingly. Attached below is a screenshot of the same issue.