Skip to content

Commit b5a2170

Browse files
authored
1 parent 91f213f commit b5a2170

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎examples/webhook_examples/webhook_flask_echo_bot.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import flask
88
import telebot
99
import logging
10+
import time
1011

1112

1213
API_TOKEN = '<api_token>'
@@ -73,6 +74,8 @@ def echo_message(message):
7374
# Remove webhook, it fails sometimes the set if there is a previous webhook
7475
bot.remove_webhook()
7576

77+
time.sleep(0.1)
78+
7679
# Set webhook
7780
bot.set_webhook(url=WEBHOOK_URL_BASE+WEBHOOK_URL_PATH,
7881
certificate=open(WEBHOOK_SSL_CERT, 'r'))

0 commit comments

Comments
 (0)