From 4f07d6ece27fcca0cda47065a3c74c76f8ec7082 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 12 Feb 2023 00:36:22 -0500 Subject: [PATCH] wait for mongoose to connect --- src/class/Client.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/class/Client.ts b/src/class/Client.ts index 2970a55..15c9516 100644 --- a/src/class/Client.ts +++ b/src/class/Client.ts @@ -77,8 +77,7 @@ export default class Client extends eris.Client { } public async loadDatabase() { - mongoose.connect(this.config.mongoDB, { - minPoolSize: 50, + await mongoose.connect(this.config.mongoDB, { }); const statMessages = await this.db.mongo.Stat.findOne({ name: 'messages' });