From 644775c6b1c8f34a60f981b6fbaf2e2486886f08 Mon Sep 17 00:00:00 2001 From: Choco Date: Tue, 1 Aug 2023 10:15:40 +0800 Subject: [PATCH] Added reminder when updating the bot --- update.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/update.py b/update.py index 810dd63..d9fb063 100644 --- a/update.py +++ b/update.py @@ -69,10 +69,20 @@ def install(response, version): def start(): """Start the update process.""" try: - response = download_file() - version = check_version() - install(response, version) - print("Update Successfully! Run `python main.py` to start your bot") + user_input = input("--------------------------------------------------------------------------\n" + "Note: Before proceeding, please ensure that there are no personal files or\n" \ + "sensitive information in the directory you're about to delete. This action\n" \ + "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: print(traceback.format_exc())