From f943ac1c01146e8ae8490b47b3336494f3885529 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 29 Jul 2019 23:36:21 +0200 Subject: [PATCH] actually its existSync --- commands/images/nolight.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/images/nolight.js b/commands/images/nolight.js index 290fa259..f5ef6fec 100644 --- a/commands/images/nolight.js +++ b/commands/images/nolight.js @@ -49,7 +49,7 @@ class nolightCommand extends Command { }); async function apng() { - if (fs.readFileSync('./img/nolight.png')) { + if (fs.existsSync('./img/nolight.png')) { fs.unlink('./img/nolight.png', (err) => { if (err) throw err; });