Skip to content

Commit 8005ca2

Browse files
authored
Update example for api server check webhook alive.
1 parent a946b79 commit 8005ca2

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎examples/webhook_examples/webhook_cpython_echo_bot.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,13 @@ def echo_message(message):
8686

8787

8888
# Remove webhook, it fails sometimes the set if there is a previous webhook
89-
bot.remove_webhook()
89+
#bot.remove_webhook()
9090

9191
# Set webhook
92-
bot.set_webhook(url=WEBHOOK_URL_BASE + WEBHOOK_URL_PATH,
93-
certificate=open(WEBHOOK_SSL_CERT, 'r'))
92+
# Beacuse telegram bot api server will check webhook server is alive.
93+
# Here we need set webhook after server started manually.
94+
#bot.set_webhook(url=WEBHOOK_URL_BASE + WEBHOOK_URL_PATH,
95+
# certificate=open(WEBHOOK_SSL_CERT, 'r'))
9496

9597
# Start server
9698
httpd = HTTPServer((WEBHOOK_LISTEN, WEBHOOK_PORT),

0 commit comments

Comments
 (0)