diff --git a/frontend/src/locales/en.js b/frontend/src/locales/en.js
index 10ecf7d..094a9b3 100644
--- a/frontend/src/locales/en.js
+++ b/frontend/src/locales/en.js
@@ -302,6 +302,8 @@ export default {
'feat.moderation.desc': 'Warnings, timeouts, cleanup — with history and a log.',
'feat.anti_raid': 'Raid protection',
'feat.anti_raid.desc': 'Spots waves of joins and locks the server down for a while.',
+ 'feat.automod': 'AutoMod log',
+ 'feat.automod.desc': "Hits from Discord's own filter land in the log; rules can be switched here.",
'feat.modlog': 'Audit log',
'feat.modlog.desc': 'Deleted and edited messages, joins, name and role changes.',
'feat.modmail': 'Modmail',
diff --git a/frontend/src/module-icons.jsx b/frontend/src/module-icons.jsx
index c7b82c1..42dbfa0 100644
--- a/frontend/src/module-icons.jsx
+++ b/frontend/src/module-icons.jsx
@@ -10,6 +10,7 @@ import {
IconArchive, IconMail, IconSupport, IconMagic, IconTeam, IconRefresh,
IconWarning, IconServer, IconMonitor, IconVoice, IconZap, IconClock,
IconSend, IconTag, IconDatabase, IconPackage, IconLock, IconIdea, IconLink,
+ IconBot,
} from './icons.jsx';
export const MODULE_ICONS = {
@@ -19,7 +20,8 @@ export const MODULE_ICONS = {
voting: IconThumbsUp, giveaways: IconGiveaway, birthdays: IconBirthday,
events: IconEvents, playtester: IconGame, alpha_keys: IconKey,
role_menus: IconRoles, applications: IconApplications,
- moderation: IconShield, anti_raid: IconLock, modlog: IconArchive, modmail: IconMail,
+ moderation: IconShield, anti_raid: IconLock, automod: IconBot,
+ modlog: IconArchive, modmail: IconMail,
linked_roles: IconLink, polls: IconThumbsUp,
tickets: IconSupport, welcome: IconMagic, autorole: IconTeam,
sticky_roles: IconRefresh, bug_reports: IconWarning,
diff --git a/frontend/src/pages/Settings.jsx b/frontend/src/pages/Settings.jsx
index fa79e9c..c19b3f7 100644
--- a/frontend/src/pages/Settings.jsx
+++ b/frontend/src/pages/Settings.jsx
@@ -343,6 +343,7 @@ export default function Settings({ me }) {
const [audit, setAudit] = useState([]);
const [serverStats, setServerStats] = useState(null);
const [watchdog, setWatchdog] = useState(null);
+ const [automod, setAutomod] = useState(null);
const [dienstDraft, setDienstDraft] = useState({ id: null, name: '', url: '', gruppe: 'Dienste', oeffentlich: false });
const [owner, setOwner] = useState(null);
const [auditAlle, setAuditAlle] = useState(false);
@@ -471,6 +472,7 @@ export default function Settings({ me }) {
// Fuers Dashboard: Mitgliederzahl und Nachrichten pro Tag
apiGet('/api/serverstats').then(setServerStats).catch(() => {});
apiGet('/api/watchdog').then(setWatchdog).catch(() => {});
+ apiGet('/api/automod').then(setAutomod).catch(() => {});
apiGet('/api/ssoapps').then((d) => setSsoApps(d.apps)).catch(() => {});
apiGet('/api/services').then((d) => setServices(d.services)).catch(() => {});
apiGet('/api/pages/all/list').then((d) => setPages(d.pages)).catch(() => {});
@@ -1818,8 +1820,76 @@ export default function Settings({ me }) {
>
);
+ /** AutoMod-Regel an- oder abschalten */
+ async function automodSchalten(id, aktiv) {
+ try {
+ await apiPut(`/api/automod/${id}`, { aktiv });
+ const frisch = await apiGet('/api/automod');
+ setAutomod(frisch);
+ } catch (e) {
+ setFeedback(e.body?.error ?? 'Umschalten fehlgeschlagen.');
+ setTimeout(() => setFeedback(null), 3000);
+ }
+ }
+
const tabSupport = (
<>
+ {automod && (
+
+
// AutoMod
+
+ Discords eigener Filter — er läuft serverseitig und ohne Umweg über den Bot.
+ Hier siehst du, was eingerichtet ist, und kannst Regeln schalten.
+ Wortlisten bearbeitest du in Discord unter Servereinstellungen → AutoMod.
+ {!automod.aktiv && ' Das Protokollieren der Treffer ist gerade ausgeschaltet.'}
+
+
+ {!automod.ok && (
+
+ Regeln nicht abrufbar: {automod.grund}
+ {' '}— fehlt dem Bot das Recht „Server verwalten"?
+