From a60270719a88e595f6e0fb716b26858885f9c9d4 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 27 Apr 2021 01:22:50 -0400 Subject: [PATCH] fixes --- src/class/Client.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/class/Client.ts b/src/class/Client.ts index 219c71e..ca58581 100644 --- a/src/class/Client.ts +++ b/src/class/Client.ts @@ -121,7 +121,13 @@ export default class Client extends eris.Client { public async loadDatabase() { - await mongoose.connect(this.config.mongoDB, { useNewUrlParser: true, useUnifiedTopology: true, poolSize: 50 }); + await mongoose.connect(this.config.mongoDB, { + useNewUrlParser: true, + useUnifiedTopology: true, + poolSize: 50, + autoReconnect: true, + replicaSet: 'rs0', + }); const statMessages = await this.db.Stat.findOne({ name: 'messages' }); const statCommands = await this.db.Stat.findOne({ name: 'commands' });