diff --git a/examples/webhook_examples/webhook_flask_echo_bot.py b/examples/webhook_examples/webhook_flask_echo_bot.py index 92ffa21..d0327d7 100644 --- a/examples/webhook_examples/webhook_flask_echo_bot.py +++ b/examples/webhook_examples/webhook_flask_echo_bot.py @@ -7,6 +7,7 @@ import flask import telebot import logging +import time API_TOKEN = '' @@ -73,6 +74,8 @@ def echo_message(message): # Remove webhook, it fails sometimes the set if there is a previous webhook bot.remove_webhook() +time.sleep(0.1) + # Set webhook bot.set_webhook(url=WEBHOOK_URL_BASE+WEBHOOK_URL_PATH, certificate=open(WEBHOOK_SSL_CERT, 'r'))