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' });