Adding mongoose
This commit is contained in:
7
index.js
7
index.js
@@ -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');
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user