mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-25 14:44:58 +05:00
58 lines
No EOL
2.3 KiB
JavaScript
58 lines
No EOL
2.3 KiB
JavaScript
const mongoose = require("mongoose"),
|
|
Schema = mongoose.Schema,
|
|
languages = require("../languages/language-meta.json");
|
|
|
|
module.exports = mongoose.model("Guild", new Schema({
|
|
/* REQUIRED */
|
|
id: { type: String }, // Discord ID of the guild
|
|
|
|
/* MEMBERSDATA */
|
|
membersData: { type: Object, default: {} }, // Members data of the guild
|
|
members: [{ type: Schema.Types.ObjectId, ref: "Member" }],
|
|
|
|
/* CONFIGURATION */
|
|
language: { type: String, default: languages.find((l) => l.default).name }, // Language of the guild
|
|
plugins: { type: Object, default: { // Plugins data
|
|
// Welcome messages
|
|
welcome: {
|
|
enabled: false, // Whether the welcome messages are enabled
|
|
message: null, // The welcome message
|
|
channel: null, // The channel to send the welcome messages
|
|
withImage: null // Whether the welcome images are enabled
|
|
},
|
|
// Goodbye messages
|
|
goodbye: {
|
|
enabled: false, // Whether the goodbye messages are enabled
|
|
message: null, // The goodbye message
|
|
channel: null, // The channel to send the goodbye messages
|
|
withImage: null // Whether the goodbye images are enabled
|
|
},
|
|
// Autorole
|
|
autorole: {
|
|
enabled: false, // Whether the autorole is enabled
|
|
role: null // The role to add when a member join the server
|
|
},
|
|
// Auto moderation
|
|
automod: {
|
|
enabled: false, // Whether the auto moderation is enabled
|
|
ignored: [] // The channels in which the auto moderation is disabled
|
|
},
|
|
// Auto sanctions
|
|
warnsSanctions: {
|
|
kick: false, // The number of warns required to kick the user
|
|
ban: false // The number of warns required to ban the user
|
|
},
|
|
// Tickets
|
|
tickets: {
|
|
enabled: false, // Whether the tickets system is enabled
|
|
category: null // The category for the tickets system
|
|
},
|
|
suggestions: false, // the channel in which the suggestions will be sent
|
|
modlogs: false, // the channel in which the moderation logs (mute, kick, ban, etc...) will be sent
|
|
birthdays: false, // the channel in which birtdays announcements will be sent
|
|
reports: false, // the channel in which the reports will be sent
|
|
logs: false // the channel in which the logs (message deleted, etc...) will be sent
|
|
}},
|
|
casesCount: { type: Number, default: 0 },
|
|
autoDeleteModCommands: { type: Boolean, default: false }, // Whether to auto delete moderation commands
|
|
})); |