JaBa/base/Guild.js

48 lines
959 B
JavaScript
Raw Normal View History

2021-12-10 21:39:54 +05:00
const mongoose = require("mongoose"),
Schema = mongoose.Schema,
languages = require("../languages/language-meta.json");
module.exports = mongoose.model("Guild", new Schema({
id: { type: String },
2021-12-10 21:39:54 +05:00
membersData: { type: Object, default: {} },
2021-12-10 21:39:54 +05:00
members: [{ type: Schema.Types.ObjectId, ref: "Member" }],
language: { type: String, default: languages.find(l => l.default).name },
plugins: { type: Object, default: {
2021-12-10 21:39:54 +05:00
welcome: {
enabled: false,
message: null,
channel: null,
withImage: null,
2021-12-10 21:39:54 +05:00
},
goodbye: {
enabled: false,
message: null,
channel: null,
withImage: null,
2021-12-10 21:39:54 +05:00
},
autorole: {
enabled: false,
role: null,
2021-12-10 21:39:54 +05:00
},
automod: {
enabled: false,
ignored: [],
2021-12-10 21:39:54 +05:00
},
warnsSanctions: {
2023-07-03 19:30:47 +05:00
kick: null,
ban: null,
2021-12-10 21:39:54 +05:00
},
2023-07-03 19:30:47 +05:00
monitoring: {
memberAdd: null,
memberLeave: null,
memberUpdate: null,
messageUpdate: null,
},
suggestions: null,
reports: null,
birthdays: null,
modlogs: null,
} },
2021-12-10 21:39:54 +05:00
}));