From 7577f0e273fd501f086529284405c6c1bfd54d15 Mon Sep 17 00:00:00 2001 From: memetrollsXD Date: Thu, 4 Aug 2022 10:58:33 +0200 Subject: [PATCH] Update r function --- src/util/Banner.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/Banner.ts b/src/util/Banner.ts index 46d3b6d..0cc9e99 100644 --- a/src/util/Banner.ts +++ b/src/util/Banner.ts @@ -12,7 +12,7 @@ type Banner = { } function r(...args: string[]) { - return fs.readFileSync(resolve(__dirname, ...args)).toString(); + return resolve(__dirname, ...args); } export default class Banners { @@ -39,7 +39,7 @@ export default class Banners { ]; try { - config = JSON.parse(r('../../banners.json')); + config = JSON.parse(fs.readFileSync(r('../../banners.json')).toString()); for(const [index, gachaBanner] of Object.entries(config)){ const missing = Object.keys(defaultConfig[0]).filter(key => !gachaBanner.hasOwnProperty(key));