From ebe09d99f7d6a86a101b155a59237c8a0831a783 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 25 Jan 2022 11:06:47 +0200 Subject: [PATCH] pls --- structure/JsonCache.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/structure/JsonCache.js b/structure/JsonCache.js index 3c55ebc..4c9aaae 100644 --- a/structure/JsonCache.js +++ b/structure/JsonCache.js @@ -1,4 +1,5 @@ const fs = require('fs'); +const pathUtil = require('path'); const CacheHandler = require('./abstractions/CacheHandler'); class JsonCache extends CacheHandler { @@ -97,8 +98,8 @@ class JsonCache extends CacheHandler { this.client.logger.info(`Verifying modmail queue.`); for (const entry of this.queue) { - const path = `../modmail_cache/${entry}.json`; - if (!fs.existsSync(path)) this.client.logger.warn(`User ${entry} is in queue but is missing history. Attempting to recover history.`); + const path = `./modmail_cache/${entry}.json`; + if (!fs.existsSync(pathUtil.resolve(path))) this.client.logger.warn(`User ${entry} is in queue but is missing history. Attempting to recover history.`); const user = await this.client.resolveUser(entry); const dm = await user.createDM();