JaBa/base/Guild.js

45 lines
967 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: {
kick: false,
ban: false
2021-12-10 21:39:54 +05:00
},
news: false,
suggestions: false,
modlogs: false,
birthdays: false,
reports: false
2021-12-10 21:39:54 +05:00
}},
casesCount: { type: Number, default: 0 },
autoDeleteModCommands: { type: Boolean, default: false },
2021-12-10 21:39:54 +05:00
}));