Add backup functionality with escalation rules for moderation commands
- Updated .env.example to include backup configuration options. - Modified docker-compose.yml to mount backup volume. - Enhanced Dockerfile to install PostgreSQL client. - Added EscalationRule model to Prisma schema for managing warning escalation. - Updated environment validation in env.ts to include backup settings. - Refactored job handling in jobs.ts to implement backup jobs and cleanup. - Introduced escalation commands in moderation service for managing user warnings. - Updated moderation commands to apply escalation rules based on warning count.
This commit is contained in:
@@ -11,7 +11,7 @@ import { logger } from './logger.js';
|
||||
import { prisma } from './db.js';
|
||||
import { redis } from './redis.js';
|
||||
import { registerCommands, routeCommand } from './commands.js';
|
||||
import { startWorkers } from './jobs.js';
|
||||
import { ensureRecurringJobs, startWorkers } from './jobs.js';
|
||||
import type { BotContext } from './types.js';
|
||||
import { startHealthServer } from './health.js';
|
||||
|
||||
@@ -39,6 +39,7 @@ if (!isShard) {
|
||||
|
||||
const context: BotContext = { client, prisma, redis };
|
||||
startWorkers(context);
|
||||
await ensureRecurringJobs();
|
||||
|
||||
client.on(Events.ClientReady, async () => {
|
||||
logger.info({ tag: client.user?.tag }, 'Bot ready');
|
||||
|
||||
Reference in New Issue
Block a user