inventory command handlers

This commit is contained in:
SowinskiBraeden committed 2022-07-04 22:21:44 -07:00
1 parent 91f60417aa
commit 20344e1471
8 files changed
+715 -1441

No files matched your search

+4
View File
@@ -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');
}