The Moderation capability provides automatic chat moderation. It runs as a passive capability, processing every message without blocking other bot features.
Detection Types
- Word Filter — Detects messages containing blocked words or phrases. Matches are case-insensitive.
- Spam Detection — Detects repeated identical messages from the same user. Configurable threshold (default: 3 messages).
- Flood Detection — Detects too many messages in a short time from one user. Configurable threshold (default: 5 messages).
- Caps Lock Abuse — Detects messages that are mostly uppercase (potential shouting).
Configuration
Admins can configure via /bot set:
-
mod_words— Comma-separated list of blocked words (e.g.,badword1,badword2) -
mod_action— Action on violation:warn,mute, orkick(default: warn) mod_spam— Spam detection threshold (default: 3)mod_flood— Flood detection threshold (default: 5)
/bot set MyBot mod_words spam,offensive,banned /bot set MyBot mod_action warn /bot set MyBot mod_spam 3 /bot set MyBot mod_flood 5
How It Works
Moderation runs as a passive capability — it processes every message before active capabilities (like dice or trivia). This means:
- It does not consume the message — other capabilities still process it
- It runs even during cooldown periods
- Multiple violations in one message trigger only one action
- The bot sends a warning or takes action in the same channel
Actions
- warn — Bot sends a warning message to the channel
- mute — Bot requests the user be muted (requires channel operator)
- kick — Bot requests the user be kicked (requires channel operator)