From 667b3f04aa66c27806cfa898027065b2d88b2067 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sun, 3 Sep 2023 11:22:31 -0600 Subject: [PATCH] Auto-create channels when we attempt to get them because Docker doesn't seem to be saving the DB file in production --- src/utils/database/json.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/database/json.ts b/src/utils/database/json.ts index 2716357..5535dd3 100644 --- a/src/utils/database/json.ts +++ b/src/utils/database/json.ts @@ -38,6 +38,9 @@ export class JSONDatabase { }; public async getChannel(name: string) { + if (this.data[name] == null) { + this.resetChannel(name); + }; return this.data[name]; }; }; \ No newline at end of file