feat: implement message pruning command with dedicated service and UI components.

This commit is contained in:
syntaxbullet
2025-12-24 20:45:40 +01:00
parent 5ab19bf826
commit 37ac0ee934
5 changed files with 534 additions and 1 deletions

View File

@@ -56,6 +56,14 @@ export interface GameConfigType {
channelId: string;
messageId: string;
};
moderation: {
prune: {
maxAmount: number;
confirmThreshold: number;
batchSize: number;
batchDelayMs: number;
};
};
}
// Initial default config state
@@ -124,7 +132,22 @@ const configSchema = z.object({
terminal: z.object({
channelId: z.string(),
messageId: z.string()
}).optional()
}).optional(),
moderation: z.object({
prune: z.object({
maxAmount: z.number().default(100),
confirmThreshold: z.number().default(50),
batchSize: z.number().default(100),
batchDelayMs: z.number().default(1000)
})
}).default({
prune: {
maxAmount: 100,
confirmThreshold: 50,
batchSize: 100,
batchDelayMs: 1000
}
})
});
export function reloadConfig() {