Enhance bot functionality with AutoMod, Logging, Welcome, and Verification features
- Implemented AutoMod capabilities including spam filtering, anti-raid, and anti-nuke actions. - Added Logging module to track moderation actions and events across the bot. - Introduced Welcome module for customizable welcome messages and autoroles. - Developed Verification system with captcha and role assignment features. - Updated Prisma schema to include new models for AutoMod, Logging, Welcome, and Verification. - Enhanced command localization for new features in both German and English. - Improved health server to handle captcha verification requests. - Added new environment variable for public base URL to support captcha links.
This commit is contained in:
@@ -14,6 +14,12 @@ model Guild {
|
||||
settings GuildSettings?
|
||||
cases Case[]
|
||||
escalationRules EscalationRule[]
|
||||
autoModConfig AutoModConfig?
|
||||
autoModRules AutoModRule[]
|
||||
loggingConfig LoggingConfig?
|
||||
logChannels LogChannel[]
|
||||
welcomeConfig WelcomeConfig?
|
||||
verificationConfig VerificationConfig?
|
||||
}
|
||||
|
||||
model GuildSettings {
|
||||
@@ -96,3 +102,104 @@ model EscalationRule {
|
||||
@@unique([guildId, warnCount])
|
||||
@@index([guildId, enabled])
|
||||
}
|
||||
|
||||
model AutoModConfig {
|
||||
id String @id @default(cuid())
|
||||
guildId String @unique
|
||||
enabled Boolean @default(true)
|
||||
antiRaidEnabled Boolean @default(false)
|
||||
antiRaidJoinThreshold Int @default(10)
|
||||
antiRaidWindowSeconds Int @default(10)
|
||||
antiRaidAction String @default("LOCKDOWN")
|
||||
antiNukeEnabled Boolean @default(false)
|
||||
antiNukeBanThreshold Int @default(5)
|
||||
antiNukeChannelThreshold Int @default(3)
|
||||
antiNukeWindowSeconds Int @default(60)
|
||||
lockdownActive Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model AutoModRule {
|
||||
id String @id @default(cuid())
|
||||
guildId String
|
||||
ruleType String
|
||||
enabled Boolean @default(true)
|
||||
action String @default("DELETE")
|
||||
threshold Json?
|
||||
exceptions Json?
|
||||
wordList Json?
|
||||
durationMs Int?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([guildId, ruleType])
|
||||
@@index([guildId, enabled])
|
||||
}
|
||||
|
||||
model LoggingConfig {
|
||||
id String @id @default(cuid())
|
||||
guildId String @unique
|
||||
enabled Boolean @default(true)
|
||||
ignoreBots Boolean @default(true)
|
||||
ignoredChannelIds String[] @default([])
|
||||
ignoredRoleIds String[] @default([])
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model LogChannel {
|
||||
id String @id @default(cuid())
|
||||
guildId String
|
||||
eventType String
|
||||
channelId String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([guildId, eventType])
|
||||
@@index([guildId])
|
||||
}
|
||||
|
||||
model WelcomeConfig {
|
||||
id String @id @default(cuid())
|
||||
guildId String @unique
|
||||
welcomeEnabled Boolean @default(false)
|
||||
leaveEnabled Boolean @default(false)
|
||||
welcomeChannelId String?
|
||||
leaveChannelId String?
|
||||
welcomeType String @default("TEXT")
|
||||
welcomeContent String?
|
||||
welcomeEmbed Json?
|
||||
leaveContent String?
|
||||
leaveEmbed Json?
|
||||
welcomeDmEnabled Boolean @default(false)
|
||||
welcomeDmContent String?
|
||||
userAutoroleIds String[] @default([])
|
||||
botAutoroleIds String[] @default([])
|
||||
imageTitle String?
|
||||
imageSubtitle String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model VerificationConfig {
|
||||
id String @id @default(cuid())
|
||||
guildId String @unique
|
||||
enabled Boolean @default(false)
|
||||
channelId String?
|
||||
verifiedRoleId String?
|
||||
unverifiedRoleId String?
|
||||
mode String @default("BUTTON")
|
||||
minAccountAgeDays Int @default(0)
|
||||
failAction String @default("KICK")
|
||||
panelChannelId String?
|
||||
panelMessageId String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
guild Guild @relation(fields: [guildId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user