From f806afa1da55bf82d6b37c3dcccb86aae195fac4 Mon Sep 17 00:00:00 2001 From: Bsian Date: Sat, 30 Nov 2019 22:55:53 +0000 Subject: [PATCH] Memory saving --- src/Client.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Client.ts b/src/Client.ts index 2547f71..e86e2b6 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -115,6 +115,9 @@ export default class Client extends Eris.Client { this.signale.complete(`Loaded interval ${interval.split('.')[0]}`); }); this.server = new Server(this, { port: this.config.port }); + + const files = Object.keys(require.cache).filter((path) => path.startsWith('/var/CloudServices/dist')); + files.forEach((file) => delete require.cache[file]); } }