From f5f8d0ce190812f6577552168ed371659b39bb9d Mon Sep 17 00:00:00 2001 From: MrMasrozYTLIVE <61359286+MrMasrozYTLIVE@users.noreply.github.com> Date: Sun, 9 Jun 2024 10:00:01 +0300 Subject: [PATCH] And I honestly have no idea why it doesnt want to work --- app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app.js b/app.js index 9fc6448..1b62e10 100644 --- a/app.js +++ b/app.js @@ -432,6 +432,9 @@ function writeConfigToFile(filePath) { async function readConfigFromFile(filePath) { await fs.readFile(filePath, 'utf8', (err, data) => { if(err) return console.log("Error while reading config.json! ", err); + console.log("1:", data); + data = JSON.parse(data); + console.log("2:", data); config.userName = data.userName; config.userAvatar = data.userAvatar; config.rooms = data.rooms;