woomy/models/guild.js

97 lines
1.4 KiB
JavaScript
Raw Normal View History

const { Schema, model } = require('mongoose')
const { defaultPrefix } = require('../config')
2020-04-04 06:59:22 +00:00
module.exports = model('Guild', new Schema({
_id: Schema.Types.ObjectId,
2020-04-04 06:59:22 +00:00
guildID: String,
prefix: {
type: String,
default: defaultPrefix
2020-04-04 06:59:22 +00:00
},
modRole: {
type: String,
default: null
2020-04-04 06:59:22 +00:00
},
adminRole: {
type: String,
default: null
2020-04-05 08:48:15 +00:00
},
mutedRole: {
type: String,
default: null
},
autoRole: {
type: String,
default: null
},
systemNotice: {
type: Object,
default: {
enabled: true,
autoDelete: 0
}
},
autoplay: {
type: Boolean,
default: false
},
plugins: {
type: Object,
default: {
welcome: {
enabled: false,
channel: null,
message: null
},
goodbye: {
enabled: false,
channel: null,
message: null
},
chatLogs: {
enabled: false,
channel: null
},
modLogs: {
enabled: false,
channel: null
}
}
},
botChannels: {
type: Array,
default: []
},
blacklisted: {
type: Array,
default: []
},
customCommands: {
type: Array,
default: []
},
disabledCommands: {
type: Array,
default: []
},
disabledCategories: {
type: Array,
default: []
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