no no FUCKING NO
This commit is contained in:
parent
2b4c6bcf14
commit
fb861e2671
16 changed files with 1792 additions and 18 deletions
|
@ -70,7 +70,7 @@ def register_name(NAME):
|
|||
if os.getenv("gooberTOKEN"):
|
||||
return
|
||||
# Name taken: print error and exit
|
||||
print(f"{RED}{(_('name_taken'))}{gv.RESET}")
|
||||
print(f"{gv.RED}{(_('name_taken'))}{gv.RESET}")
|
||||
quit()
|
||||
# Register the name
|
||||
response = requests.post(f"{gv.VERSION_URL}/register", json={"name": NAME}, headers={"Content-Type": "application/json"})
|
||||
|
|
|
@ -37,7 +37,7 @@ arch = platform.machine()
|
|||
slash_commands_enabled = True # 100% broken, its a newer enough version so its probably enabled by default.... fix this at somepoint or hard code it in goober central code
|
||||
launched = False
|
||||
latest_version = "0.0.0"
|
||||
local_version = "2.0.2"
|
||||
local_version = "2.1.0"
|
||||
os.environ['gooberlocal_version'] = local_version
|
||||
REACT = os.getenv("REACT")
|
||||
beta = False # this makes goober think its a beta version, so it will not update to the latest stable version or run any version checks
|
||||
|
|
|
@ -127,7 +127,7 @@ def check_requirements():
|
|||
"token": gooberTOKEN
|
||||
}
|
||||
try:
|
||||
requests.post(VERSION_URL + "/ping", json=payload)
|
||||
requests.post(VERSION_URL + "/ping", json=payload) # type: ignore
|
||||
except Exception as e:
|
||||
print(f"{RED}{(_('failed_to_contact')).format(url=VERSION_URL, error=e)}{RESET}")
|
||||
sys.exit(1)
|
||||
|
@ -173,7 +173,7 @@ def check_memory():
|
|||
if psutilavaliable == False:
|
||||
return
|
||||
try:
|
||||
memory_info = psutil.virtual_memory()
|
||||
memory_info = psutil.virtual_memory() # type: ignore
|
||||
total_memory = memory_info.total / (1024 ** 3)
|
||||
used_memory = memory_info.used / (1024 ** 3)
|
||||
free_memory = memory_info.available / (1024 ** 3)
|
||||
|
@ -193,7 +193,7 @@ def check_cpu():
|
|||
if psutilavaliable == False:
|
||||
return
|
||||
print((_('measuring_cpu')))
|
||||
cpu_per_core = psutil.cpu_percent(interval=1, percpu=True)
|
||||
cpu_per_core = psutil.cpu_percent(interval=1, percpu=True) # type: ignore
|
||||
for idx, core_usage in enumerate(cpu_per_core):
|
||||
bar_length = int(core_usage / 5)
|
||||
bar = '█' * bar_length + '-' * (20 - bar_length)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue