forgot to ensure dir exists

This commit is contained in:
Erik 2021-06-19 21:38:27 +03:00
parent 0acb27135f
commit d0dd677294
No known key found for this signature in database
GPG Key ID: 7E862371D3409F16

View File

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