wait for mongoose to connect
parent
d696dcf804
commit
4f07d6ece2
|
@ -77,8 +77,7 @@ export default class Client extends eris.Client {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async loadDatabase() {
|
public async loadDatabase() {
|
||||||
mongoose.connect(this.config.mongoDB, {
|
await mongoose.connect(this.config.mongoDB, {
|
||||||
minPoolSize: 50,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const statMessages = await this.db.mongo.Stat.findOne({ name: 'messages' });
|
const statMessages = await this.db.mongo.Stat.findOne({ name: 'messages' });
|
||||||
|
|
Loading…
Reference in New Issue