From d0dd6772947c147a2c81c05c42dbd76bf356adfd Mon Sep 17 00:00:00 2001 From: Navy Date: Sat, 19 Jun 2021 21:38:27 +0300 Subject: [PATCH] forgot to ensure dir exists --- structure/Modmail.js | 1 + 1 file changed, 1 insertion(+) diff --git a/structure/Modmail.js b/structure/Modmail.js index 31a48e8..0f2b8a5 100644 --- a/structure/Modmail.js +++ b/structure/Modmail.js @@ -532,6 +532,7 @@ class Modmail { const toSave = [...this.updatedThreads]; this.updatedThreads = []; this.client.logger.debug(`Saving modmail data`); + if (!fs.existsSync('./modmail_cache')) fs.mkdirSync('./modmail_cache'); for (const id of toSave) { const path = `./modmail_cache/${id}.json`;