mrmBot-Matrix/utils/database.js

24 lines
577 B
JavaScript
Raw Normal View History

2019-09-13 20:02:41 +00:00
// database stuff
2019-10-28 20:21:06 +00:00
const mongoose = require("mongoose");
mongoose.connect(process.env.MONGO);
2019-10-28 20:21:06 +00:00
const guildSchema = new mongoose.Schema({
id: String,
tags: Map,
prefix: String
});
const Guild = mongoose.model("Guild", guildSchema);
const tweetSchema = new mongoose.Schema({
tweets: [String],
replies: [String],
media: [String],
phrases: [String],
games: [String],
characters: [String],
download: [String],
enabled: Boolean
});
const TweetCollection = mongoose.model("TweetCollection", tweetSchema);
exports.guilds = Guild;
exports.tweets = TweetCollection;