Implement logging for verification failures and enhance moderation responses

- Introduced a new logging event type `VERIFICATION_FAIL` to capture details of failed verification attempts, including reasons and actions taken.
- Updated moderation commands to include reasons in success messages for actions like ban, kick, and timeout.
- Enhanced the logging of ban and kick actions to include moderator information and reasons fetched from the audit log.
- Improved localization for new logging messages in both English and German.
- Documented changes in the phase tracking documentation to reflect the new logging capabilities and verification failure handling.
This commit is contained in:
TheOnlyMace
2026-07-25 16:14:41 +02:00
parent 1eec10ba80
commit dbee58cd81
11 changed files with 193 additions and 23 deletions

View File

@@ -193,7 +193,8 @@ export const LogEventTypeDashboardSchema = z.enum([
'THREAD_UPDATE',
'THREAD_DELETE',
'GUILD_UPDATE',
'MOD_ACTION'
'MOD_ACTION',
'VERIFICATION_FAIL'
]);
export type LogEventTypeDashboard = z.infer<typeof LogEventTypeDashboardSchema>;

View File

@@ -119,6 +119,8 @@ const de: Dictionary = {
'Gelöscht/anonymisiert: {warnings} Verwarnungen, {levels} Level-Einträge, {economy} Economy-Einträge, {cases} Cases anonymisiert.',
'moderation.success': 'Aktion erfolgreich ausgeführt.',
'moderation.success.case': 'Aktion erfolgreich ausgeführt (Fall #{caseNumber}).',
'moderation.success.caseWithReason':
'Aktion erfolgreich ausgeführt (Fall #{caseNumber}).\nGrund: {reason}',
'moderation.duration.invalid': 'Ungültige Dauer. Nutze z. B. 30m, 12h oder 7d.',
'moderation.duration.invalidTimeout':
'Ungültige Timeout-Dauer. Nutze z. B. 30m oder 1d (max. 28 Tage).',
@@ -718,6 +720,8 @@ const en: Dictionary = {
'Deleted/anonymized: {warnings} warnings, {levels} level rows, {economy} economy rows, {cases} cases anonymized.',
'moderation.success': 'Action executed successfully.',
'moderation.success.case': 'Action executed successfully (case #{caseNumber}).',
'moderation.success.caseWithReason':
'Action executed successfully (case #{caseNumber}).\nReason: {reason}',
'moderation.duration.invalid': 'Invalid duration. Use e.g. 30m, 12h, or 7d.',
'moderation.duration.invalidTimeout':
'Invalid timeout duration. Use e.g. 30m or 1d (max 28 days).',

View File

@@ -123,7 +123,8 @@ export const LogEventTypeSchema = z.enum([
'THREAD_UPDATE',
'THREAD_DELETE',
'GUILD_UPDATE',
'MOD_ACTION'
'MOD_ACTION',
'VERIFICATION_FAIL'
]);
export type LogEventType = z.infer<typeof LogEventTypeSchema>;