From 259aa04bdb931051e792bd4b8f68bb2f3f890f6a Mon Sep 17 00:00:00 2001 From: Nayan <33187059+GShadow5@users.noreply.github.com> Date: Tue, 26 Aug 2025 23:59:51 +0000 Subject: [PATCH] setup first files for new program --- fsio.py | 11 +++++++++++ main.py | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 fsio.py create mode 100644 main.py diff --git a/fsio.py b/fsio.py new file mode 100644 index 0000000..bf2a0f8 --- /dev/null +++ b/fsio.py @@ -0,0 +1,11 @@ +import json + +def read_config_file(config_file): + with open(config_file, 'r') as f: + config = json.load(f) + return config['config'] + +def read_servers_file(servers_file): + with open(servers_file, 'r') as f: + servers = json.load(f) + return servers['servers'] \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..a94622c --- /dev/null +++ b/main.py @@ -0,0 +1,12 @@ +import os + +from dotenv import load_dotenv + +from fsio import read_config_file, read_servers_file + +load_dotenv() + +TOKEN = os.getenv('DISCORD_TOKEN') +BASE_PATH = os.getenv('BASE_PATH', './') + +print(read_config_file("config.json")["chat_channel"]) \ No newline at end of file