inventory command handlers
This commit is contained in:
8 files changed
+715
-1441
No files matched your search
@@ -1,5 +1,6 @@
|
||||
const { Collection, Client, MessageEmbed } = require('discord.js');
|
||||
const MongoClient = require('mongodb').MongoClient;
|
||||
const mongoose = require('mongoose');
|
||||
const Logger = require("../util/Logger");
|
||||
const path = require("path");
|
||||
const fs = require('fs');
|
||||
@@ -61,8 +62,11 @@ class QuarksBot extends Client {
|
||||
}
|
||||
|
||||
async connectMongo(mongoURI, dbo) {
|
||||
// Connect to MongoDB database.
|
||||
this.db = await MongoClient.connect(mongoURI);
|
||||
this.dbo = this.db.db(dbo);
|
||||
|
||||
mongoose.connect(`${mongoURI}/${dbo}`);
|
||||
this.log('Successfully connected to mongoDB');
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user