Adding mongoose
This commit is contained in:
9
index.js
9
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');
|
||||||
|
|
||||||
@@ -106,4 +107,8 @@ client.on(Events.ClientReady, () => {
|
|||||||
client.user.setStatus('dnd');
|
client.user.setStatus('dnd');
|
||||||
});
|
});
|
||||||
|
|
||||||
client.login(token);
|
client.login(token);
|
||||||
|
|
||||||
|
connect(mongoURI, {}).then(() => {
|
||||||
|
console.log('Connected to MongoDB');
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user