Implement warning system enhancements with unique identifiers

- Added a `warningNumber` field to the `Warning` model for sequential identification of warnings.
- Updated the `createWarning` function to handle the new `warningNumber` logic and notify users via DM upon receiving a warning.
- Refactored moderation commands to utilize the new warning system, including changes to the warning creation and removal processes.
- Enhanced the WebUI to display warning numbers in the warnings table and updated localization for related messages.
- Documented changes in phase tracking to reflect the new warning system features.
This commit is contained in:
TheOnlyMace
2026-07-25 17:31:28 +02:00
parent 061e287390
commit 2058713e03
14 changed files with 218 additions and 52 deletions

View File

@@ -105,6 +105,7 @@ export function WarningsTable({ guildId, initialWarnings }: WarningsTableProps)
<table className="w-full text-sm">
<thead>
<tr className="border-b border-border text-left text-xs uppercase text-muted-foreground">
<th className="py-2 pr-4">#</th>
<th className="py-2 pr-4">{t('modulePages.moderation.target')}</th>
<th className="py-2 pr-4">{t('modulePages.moderation.moderator')}</th>
<th className="py-2 pr-4">{t('modulePages.moderation.reason')}</th>
@@ -115,6 +116,7 @@ export function WarningsTable({ guildId, initialWarnings }: WarningsTableProps)
<tbody className="divide-y divide-border">
{warnings.map((entry) => (
<tr key={entry.id}>
<td className="py-2 pr-4 font-mono text-xs">#{entry.warningNumber}</td>
<td className="py-2 pr-4 font-mono text-xs">{entry.userId}</td>
<td className="py-2 pr-4 font-mono text-xs">{entry.moderatorId}</td>
<td className="max-w-64 truncate py-2 pr-4">