aboutsummaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/config.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/shared/config.py b/shared/config.py
index 4c64220..09ced45 100644
--- a/shared/config.py
+++ b/shared/config.py
@@ -1,11 +1,15 @@
1import logging
1from copy import deepcopy 2from copy import deepcopy
2from json import dump, load 3from json import dump, load
3from os import environ as env 4from os import environ as env
4from os import path 5from os import path
5from typing import Any 6from typing import Any
6 7
8logging.info("Load configs")
9
7if not path.exists("data/settings.json"): 10if not path.exists("data/settings.json"):
8 open("data/settings.json", "w").close() 11 with open("data/settings.json", "w") as f:
12 f.write("{}")
9fields: dict[str, Any] = { 13fields: dict[str, Any] = {
10 "chances": {}, 14 "chances": {},
11} 15}
@@ -21,4 +25,4 @@ def save():
21 25
22# Configs 26# Configs
23token = env["TOKEN"] 27token = env["TOKEN"]
24chances = settings["chances"] 28chances: dict[str, int] = settings["chances"]