diff --git a/bot.py b/bot.py index 5039ea2..63f09ab 100644 --- a/bot.py +++ b/bot.py @@ -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*", diff --git a/config.py b/config.py index 9bce63b..58f82ec 100644 --- a/config.py +++ b/config.py @@ -2,6 +2,4 @@ URL = "http://140.124.184.228:8080/Exam" # The Great KCOJ # KCOJ_bot's Detail TOKEN = "" -NAME = "@kcoj_bot" -# Administrators List -ADMIN = [] \ No newline at end of file +NAME = "@kcoj_bot" \ No newline at end of file