From d72cf654c6f37d4a4b6123ba2040b095988dcdc7 Mon Sep 17 00:00:00 2001 From: Akinari Date: Fri, 26 Mar 2021 19:53:12 +0100 Subject: [PATCH] fix system tray error --- index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/index.js b/index.js index 20db530..c02ff4d 100644 --- a/index.js +++ b/index.js @@ -30,6 +30,25 @@ if (!fs.existsSync('./teams')) { }) } +//create settings file at first run +if (!fs.existsSync('./settings.json')) { + let data = { + "apikey":"", + "matchid":"", + "stage":"", + "nofmaps":"", + "warmups":"", + "bestof":"", + "matchtype":"", + "userid":"", + "reverse":"", + "visualizerstyle":"", + "compactUI":false, + "systemTray":true + } + fs.writeFileSync('./settings.json', JSON.stringify(data)) +} + function readSettingsJson() { try { let data = JSON.parse(fs.readFileSync('./settings.json'))