rm admin list

This commit is contained in:
2018-05-06 15:13:00 +08:00
parent f80f40542c
commit e709652241
2 changed files with 2 additions and 12 deletions

10
bot.py
View File

@ -9,7 +9,7 @@ from pprint import pprint
import telepot
from telepot.loop import MessageLoop
# config
from config import NAME, TOKEN, ADMIN
from config import NAME, TOKEN
from interface import Kuser
bot = telepot.Bot(TOKEN)
@ -43,14 +43,6 @@ def on_chat(msg):
if msg['text'].startswith('/'):
command = msg['text'].replace(NAME, '').replace('_', ' ').lower().split(' ')
# restart this bot
if command[0] == '/restart' and str(from_id) in ADMIN:
bot.sendMessage(chat_id, "即將更新並重新啟動")
print("Restarting...")
backup_db()
time.sleep(1)
os._exit(0)
# test connection
elif command[0] == '/ping':
bot.sendMessage(chat_id, "*PONG*",