mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Update example for api server check webhook alive.
This commit is contained in:
parent
a946b79839
commit
8005ca2f6c
@ -86,11 +86,13 @@ def echo_message(message):
|
|||||||
|
|
||||||
|
|
||||||
# Remove webhook, it fails sometimes the set if there is a previous webhook
|
# Remove webhook, it fails sometimes the set if there is a previous webhook
|
||||||
bot.remove_webhook()
|
#bot.remove_webhook()
|
||||||
|
|
||||||
# Set webhook
|
# Set webhook
|
||||||
bot.set_webhook(url=WEBHOOK_URL_BASE + WEBHOOK_URL_PATH,
|
# Beacuse telegram bot api server will check webhook server is alive.
|
||||||
certificate=open(WEBHOOK_SSL_CERT, 'r'))
|
# Here we need set webhook after server started manually.
|
||||||
|
#bot.set_webhook(url=WEBHOOK_URL_BASE + WEBHOOK_URL_PATH,
|
||||||
|
# certificate=open(WEBHOOK_SSL_CERT, 'r'))
|
||||||
|
|
||||||
# Start server
|
# Start server
|
||||||
httpd = HTTPServer((WEBHOOK_LISTEN, WEBHOOK_PORT),
|
httpd = HTTPServer((WEBHOOK_LISTEN, WEBHOOK_PORT),
|
||||||
|
Loading…
Reference in New Issue
Block a user