Enhance purge command with additional filtering options

- Added user, bots, links, attachments, and regex options to the purge command for more granular message deletion.
- Updated the command execution logic to filter messages based on the new options before bulk deletion.
- Modified CreateCaseInput type to use Prisma.InputJsonValue for metadata.
This commit is contained in:
smueller
2026-07-22 11:18:33 +02:00
parent dd3b132f73
commit b0e3409793
4 changed files with 77 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
import { moderationQueue } from '../../jobs.js';
import type { BotContext } from '../../types.js';
import { PermissionFlagsBits, type ChatInputCommandInteraction } from 'discord.js';
import type { Prisma } from '@prisma/client';
type CreateCaseInput = {
guildId: string;
@@ -8,7 +9,7 @@ type CreateCaseInput = {
moderatorId: string;
action: string;
reason?: string;
metadata?: Record<string, unknown>;
metadata?: Prisma.InputJsonValue;
};
export async function createCase(context: BotContext, input: CreateCaseInput) {