wait for mongoose to connect

master
Matthew 2023-02-12 00:36:22 -05:00
parent d696dcf804
commit 4f07d6ece2
1 changed files with 1 additions and 2 deletions

View File

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