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:
21
apps/bot/src/guild.ts
Normal file
21
apps/bot/src/guild.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { PrismaClient } from '@prisma/client';
|
||||
|
||||
export async function ensureGuild(prisma: PrismaClient, guildId: string): Promise<void> {
|
||||
await prisma.guild.upsert({
|
||||
where: { id: guildId },
|
||||
update: {},
|
||||
create: { id: guildId }
|
||||
});
|
||||
}
|
||||
|
||||
export async function ensureGuildSettings(
|
||||
prisma: PrismaClient,
|
||||
guildId: string
|
||||
): Promise<void> {
|
||||
await ensureGuild(prisma, guildId);
|
||||
await prisma.guildSettings.upsert({
|
||||
where: { guildId },
|
||||
update: {},
|
||||
create: { guildId }
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user