mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
parent
91f213ff34
commit
b5a217013a
@ -7,6 +7,7 @@
|
|||||||
import flask
|
import flask
|
||||||
import telebot
|
import telebot
|
||||||
import logging
|
import logging
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
API_TOKEN = '<api_token>'
|
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
|
# Remove webhook, it fails sometimes the set if there is a previous webhook
|
||||||
bot.remove_webhook()
|
bot.remove_webhook()
|
||||||
|
|
||||||
|
time.sleep(0.1)
|
||||||
|
|
||||||
# Set webhook
|
# Set webhook
|
||||||
bot.set_webhook(url=WEBHOOK_URL_BASE+WEBHOOK_URL_PATH,
|
bot.set_webhook(url=WEBHOOK_URL_BASE+WEBHOOK_URL_PATH,
|
||||||
certificate=open(WEBHOOK_SSL_CERT, 'r'))
|
certificate=open(WEBHOOK_SSL_CERT, 'r'))
|
||||||
|
Loading…
Reference in New Issue
Block a user