woomy/models/guild.js

37 lines
764 B
JavaScript
Raw Normal View History

2020-04-04 06:59:22 +00:00
const mongoose = require('mongoose')
const Schema = mongoose.Schema
const { defaultGuildSettings: defaults } = require('../config')
module.exports = mongoose.model('Guild', new Schema({
_id: mongoose.Schema.Types.ObjectId,
guildID: String,
guildName: String,
prefix: {
type: String,
default: defaults.prefix
},
systemNotice: {
type: Boolean,
default: defaults.systemNotice
},
modRole: {
type: String,
default: defaults.modRole
},
adminRole: {
type: String,
2020-04-04 09:16:05 +00:00
default: defaults.adminRole
2020-04-05 08:48:15 +00:00
},
mutedRole: {
type: String,
default: defaults.mutedRole
2020-04-04 06:59:22 +00:00
}
}))
2020-04-05 08:48:15 +00:00
// I SPWENT TWO FUCKONG DAUYS TRYING TO FIGURE OUT HOW TO UPDATE EXISTING DB ENTRIES WITH NEW SCHEMA SHIT AND IT DOES THIS BY FUCKING DEFAULT