1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #502 from fojetin/patch-1

Fix #253 #231 #485
This commit is contained in:
FrankWang 2018-05-04 07:18:57 +08:00 committed by GitHub
commit e1e109bef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@
import flask
import telebot
import logging
import time
API_TOKEN = '<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'))