JaBa/base/Guild.js

56 lines
1 KiB
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 },
2023-07-05 00:58:06 +05:00
plugins: {
type: Object,
default: {
welcome: {
enabled: false,
message: null,
channel: null,
withImage: null,
},
goodbye: {
enabled: false,
message: null,
channel: null,
withImage: null,
},
autorole: {
enabled: false,
role: null,
},
automod: {
enabled: false,
ignored: [],
},
warnsSanctions: {
kick: null,
ban: null,
},
monitoring: {
memberAdd: null,
memberLeave: null,
memberUpdate: null,
messageUpdate: null,
},
2023-07-07 17:34:23 +05:00
tickets: {
ticketLogs: null,
transcriptionLogs: null,
},
2023-07-05 00:58:06 +05:00
suggestions: null,
reports: null,
birthdays: null,
modlogs: null,
2021-12-10 21:39:54 +05:00
},
2023-07-05 00:58:06 +05:00
},
}));