delete function separated

This commit is contained in:
2017-08-24 17:21:09 +08:00
parent 2e7b1c3d21
commit 63050b6ad0
2 changed files with 16 additions and 21 deletions

8
bot.py
View File

@ -89,9 +89,9 @@ def on_chat(msg):
users[str(from_id)] = user
user.logout_system()
elif command[0] == '回題目📜' and user.question != '題外':
elif (command[0] == '/delete' or command[0] == '刪除作業⚔️') and user.question != '題外':
if user.check_online() == True:
user.display_question(chat_id ,user.question)
user.delete_answer()
elif (command[0] == '/upload' or command[0] == '交作業📮') and user.question != '題外':
if user.check_online() == True:
@ -105,6 +105,10 @@ def on_chat(msg):
if user.check_online() == True:
user.list_passers()
elif command[0] == '回題目📜' and user.question != '題外':
if user.check_online() == True:
user.display_question(chat_id ,user.question)
elif user.status == '舊的密碼':
if user.check_online() == True:
user.press_newpassword(msg['text'])