From 03d44990b83287204607659cfaa99b6f47dfbb77 Mon Sep 17 00:00:00 2001 From: dkay Date: Thu, 1 May 2025 17:07:55 -0700 Subject: [PATCH] make config.yml path configurable in .env file --- default.env | 1 + techsupport_bot/bot.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/default.env b/default.env index f8dfa5dd0..46fd51a58 100644 --- a/default.env +++ b/default.env @@ -2,3 +2,4 @@ POSTGRES_DB_NAME= POSTGRES_DB_PASSWORD= POSTGRES_DB_USER= DEBUG= +CONFIG_YML=./config.yml \ No newline at end of file diff --git a/techsupport_bot/bot.py b/techsupport_bot/bot.py index 133ffbf1f..64b611abc 100644 --- a/techsupport_bot/bot.py +++ b/techsupport_bot/bot.py @@ -47,7 +47,7 @@ class TechSupportBot(commands.Bot): FUNCTIONS_DIR (str):The list of all files in the FUNCTIONS_DIR_NAME folder """ - CONFIG_PATH: str = "./config.yml" + CONFIG_PATH: str = os.environ.get("CONFIG_YML", "./config.yml") EXTENSIONS_DIR_NAME: str = "commands" EXTENSIONS_DIR: str = ( f"{os.path.join(os.path.dirname(__file__))}/{EXTENSIONS_DIR_NAME}"