0

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.

enter image description here

  • Does this answer your question? [How to delete queue updates in telegram api?](https://stackoverflow.com/questions/61976560/how-to-delete-queue-updates-in-telegram-api) – 0stone0 Jun 27 '23 at 13:05
  • You'll need to remove the updates, please see marked duplicate. – 0stone0 Jun 27 '23 at 13:06
  • thanks, also i have implemented it. But how can i stop getting the same updates for now. setting up a new webhook still doesnt stops it – Prajjwal Pathak Jun 27 '23 at 13:22

0 Answers0