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`;