diff --git a/src/bot.ts b/src/bot.ts index 93d3568..1a0b206 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -149,7 +149,7 @@ client.connect().then(async () => { }); fs.writeFileSync( - "messages.json", + "./persist/messages.json", JSON.stringify(session.data), "utf8", ); @@ -184,7 +184,7 @@ client.connect().then(async () => { }); fs.writeFileSync( - "messages.json", + "./persist/messages.json", JSON.stringify(session.data), "utf8", ); @@ -226,7 +226,11 @@ client.connect().then(async () => { content: `[md]${contentOf(response)}[/md]`, }); - fs.writeFileSync("messages.json", JSON.stringify(session.data), "utf8"); + fs.writeFileSync( + "./persist/messages.json", + JSON.stringify(session.data), + "utf8", + ); } catch (err) { logger.error(`fs write failed: ${err}`);