import { Schema, model } from "mongoose"; export interface IGuildConfig { guildId: string; logging: { channelId?: string; }; welcome: { channelId?: string; message?: string; }; autoRoles: { memberRoleId?: string; botRoleId?: string; }; } const GuildConfigSchema = new Schema({ guildId: { type: String, required: true, unique: true, index: true }, logging: { channelId: { type: String }, }, welcome: { channelId: { type: String }, message: { type: String }, }, autoRoles: { memberRoleId: { type: String }, botRoleId: { type: String }, }, }); export const GuildConfig = model("GuildConfig", GuildConfigSchema);