Moved from Enmap/SQLite to MongoDB

This commit is contained in:
TheEssem 2019-10-28 15:21:06 -05:00
parent 7d1ca165b7
commit 606c1ea1dc
11 changed files with 214 additions and 112 deletions

View file

@ -1,6 +1,11 @@
// database stuff
const Enmap = require("enmap");
const settings = new Enmap({ name: "settings" });
exports.settings = settings;
const tags = new Enmap({ name: "tags" });
exports.tags = tags;
const mongoose = require("mongoose");
const config = require("../config.json");
mongoose.connect(config.mongoURL);
const guildSchema = new mongoose.Schema({
id: String,
tags: Map,
prefix: String
});
const Guild = mongoose.model("Guild", guildSchema);
module.exports = Guild;