Added reminder when updating the bot

This commit is contained in:
Choco
2023-08-01 10:15:40 +08:00
parent 7e2b4c3b11
commit 644775c6b1

View File

@@ -69,10 +69,20 @@ def install(response, version):
def start(): def start():
"""Start the update process.""" """Start the update process."""
try: try:
response = download_file() user_input = input("--------------------------------------------------------------------------\n"
version = check_version() "Note: Before proceeding, please ensure that there are no personal files or\n" \
install(response, version) "sensitive information in the directory you're about to delete. This action\n" \
print("Update Successfully! Run `python main.py` to start your bot") "is irreversible, so it's important to double-check that you're making the \n" \
"right decision. Continue with caution? (Y/n) ")
if user_input.lower() in ["y", "yes"]:
response = download_file()
version = check_version()
install(response, version)
print("Update Successfully! Run `python main.py` to start your bot")
else:
print("Update canceled!")
except Exception as e: except Exception as e:
print(traceback.format_exc()) print(traceback.format_exc())