From 040f9317455f6a554729b974464d201f2e161bc9 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Mon, 4 Nov 2024 12:13:57 -0600 Subject: [PATCH] new env var --- src/stats.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stats.ts b/src/stats.ts index d1e66ac..a0d7fe5 100644 --- a/src/stats.ts +++ b/src/stats.ts @@ -28,7 +28,7 @@ const uptimeObject: Map = loadUptimeObject(); export{ uptimeObject as uptime }; function loadUptimeObject(): Map{ - const filePath = path.join(__dirname, "..", "uptime.json"); + const filePath = process.env.UPTIMEJSON||path.join(__dirname, "..", "uptime.json"); if(fs.existsSync(filePath)){ try{ const data = JSON.parse(fs.readFileSync(filePath, "utf8")); @@ -255,4 +255,4 @@ function setStatus(instance: string | Instance, status: boolean): void{ calcStats(instance); } } -} \ No newline at end of file +}