Adding mongoose

This commit is contained in:
2023-03-13 20:57:30 +01:00
parent ba693b170a
commit 2e01c14de6

View File

@@ -1,5 +1,6 @@
const { Client, GatewayIntentBits, Partials, ActivityType, Events, Collection } = require('discord.js'); const { Client, GatewayIntentBits, Partials, ActivityType, Events, Collection } = require('discord.js');
const { token, hypixelApiKey } = require('./config.json'); const { token, mongoURI } = require('./config.json');
const { connect } = require('mongoose');
const path = require('path'); const path = require('path');
const fs = require('fs'); const fs = require('fs');
@@ -107,3 +108,7 @@ client.on(Events.ClientReady, () => {
}); });
client.login(token); client.login(token);
connect(mongoURI, {}).then(() => {
console.log('Connected to MongoDB');
})