This commit is contained in:
fojetin 2018-04-30 15:41:12 +03:00 committed by GitHub
parent 91f213ff34
commit b5a217013a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

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'))