mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
Update tgbot.py
This commit is contained in:
@@ -42,6 +42,13 @@ def writeConf(data):
|
||||
|
||||
# start tgbot
|
||||
cfg = getConfigData()
|
||||
while True:
|
||||
cfg = getConfigData()
|
||||
if 'bot' in cfg and 'app_token' in cfg['bot']:
|
||||
if cfg['bot']['app_token'] != '' and cfg['bot']['app_token'] != 'app_token':
|
||||
break
|
||||
time.sleep(3)
|
||||
|
||||
bot = telebot.TeleBot(cfg['bot']['app_token'])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user