pull/11/head
SpenserCai 2023-08-24 11:23:39 +08:00
parent a2647bbe9c
commit 6136f8a2f0
2 changed files with 7 additions and 4 deletions

View File

@ -3,7 +3,7 @@ Author: SpenserCai
Date: 2023-08-23 23:12:27
version:
LastEditors: SpenserCai
LastEditTime: 2023-08-24 09:36:03
LastEditTime: 2023-08-24 11:23:23
Description: file content
'''
import os
@ -28,7 +28,7 @@ def get_my_dir():
return scripts.basedir()
def check_bin():
bin_path = os.path.join(get_my_dir(), "bin")
print(bin_path)
if os.path.isfile(get_bin_process_path()):
return True
return False
@ -39,6 +39,8 @@ def need_update():
tag_name = data["tag_name"]
with open(os.path.join(bin_path, ".version"), "r") as file:
version = file.read()
# version 去掉头尾空格换行符
version = version.strip()
if tag_name == version:
return False
return True

View File

@ -3,7 +3,7 @@ Author: SpenserCai
Date: 2023-08-23 23:07:15
version:
LastEditors: SpenserCai
LastEditTime: 2023-08-24 11:15:46
LastEditTime: 2023-08-24 11:18:57
Description: file content
'''
from modules import script_callbacks, paths_internal
@ -41,7 +41,8 @@ def discord_tab():
gr.Label("Discord Bot Token")
token = gr.Textbox(lines=1, placeholder="Enter your Discord Bot Token")
token.value = get_desensitization_token(load_config("token"))
token_old = gr.Textbox(lines=1, placeholder="Enter your Discord Bot Token", type="hidden")
token_old = gr.Textbox(lines=1, placeholder="Enter your Discord Bot Token")
token_old.style = "display:none"
token_old.value = get_desensitization_token(load_config("token"))
gr.Label("Discord Server ID")