From 8a163139df7252aa5471e660c93f7b6cd397c5e3 Mon Sep 17 00:00:00 2001 From: MeowcaTheoRange Date: Mon, 19 Feb 2024 17:23:47 -0600 Subject: [PATCH] automagically create file --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7f7d3f2..ee16b5c 100644 --- a/index.js +++ b/index.js @@ -17,7 +17,7 @@ function checkLastSong({ name, channelName }) { } function writeLastSong({ name, channelName }) { - writeFileSync(path.join(__dirname, "last_song.txt"), `${name} - ${channelName}`, 'utf8'); + writeFileSync(path.join(__dirname, "last_song.txt"), `${name} - ${channelName}`, { recursive: true, encoding: 'utf-8' }); return null; }