This document provides comprehensive documentation for the ISROBOT moderation system, including setup, usage, and best practices.
- Overview
- Quick Start
- Core Concepts
- Configuration
- Moderator Guide
- User Guide
- AI Moderation
- Advanced Topics
- Troubleshooting
The ISROBOT moderation system is a comprehensive solution for Discord server moderation that combines:
- Intelligent Warning System: Progressive escalation with automatic decay
- Temporary Muting: Automatic muting at warning thresholds
- User Appeals: Allow users to contest warnings
- AI Assistance: Ollama-powered message flagging (optional)
- Complete Audit Trail: Immutable logging of all actions
- User-Friendly: Context menus and slash commands
✅ Human Control: AI assists but never makes final decisions
✅ Transparency: Users notified of all actions, can appeal
✅ Progressive: Gradual escalation with second chances
✅ Customizable: Per-guild configuration for all settings
✅ Privacy-First: All data stored locally, no external APIs
Set up your moderation channels:
/modconfig set log_channel #mod-log
/modconfig set appeal_channel #appeals
Warn a user using slash command:
/warn @user Spam in general chat
Or right-click a message → Apps → "Warn User"
Check a user's warnings:
/warns @user
/modconfig set ai_enabled true
/modconfig set ai_flag_channel #ai-flags
/modconfig set ai_confidence_threshold 60
| Warn Count | Automatic Action | User Impact |
|---|---|---|
| 1 | DM notification | Warning issued |
| 2 | 1-hour mute + DM | Cannot send messages for 1 hour |
| 3 | 24-hour mute + DM | Cannot send messages for 24 hours |
| 4+ | None | Moderator must decide action |
Warnings automatically expire based on warn count:
| Current Warns | Decay Period | Rationale |
|---|---|---|
| 1 | 7 days | Quick redemption for first-time issues |
| 2 | 14 days | More time needed after second offense |
| 3 | 21 days | Significant time to demonstrate improvement |
| 4+ | 28 days | Extended period for repeated violations |
Important Notes:
- Only the oldest warning decays per cycle
- When warn count reaches 0, active mute is removed
- Users receive DM notification when warnings decay
- All decay events logged in moderation log
Automatic Mutes:
- Triggered at 2 and 3 warnings
- Duration configurable per server
- Uses Discord's native timeout feature
- Automatically removed when expired
Manual Mutes:
- Issue with
/mutecommand - Specify custom duration (e.g.,
1h,30m,1d) - Independent of warning system
- Tracked with expiration
/modconfig view
/modconfig set <parameter> <value>
| Parameter | Description | Example |
|---|---|---|
log_channel |
Where moderation actions are logged | /modconfig set log_channel #mod-log |
appeal_channel |
Where user appeals appear | /modconfig set appeal_channel #appeals |
ai_flag_channel |
Where AI flags messages | /modconfig set ai_flag_channel #ai-flags |
| Parameter | Description | Example | Default |
|---|---|---|---|
ai_enabled |
Enable/disable AI flagging | /modconfig set ai_enabled true |
true |
ai_confidence_threshold |
Minimum score to flag (0-100) | /modconfig set ai_confidence_threshold 65 |
60 |
ai_model |
Ollama model name | /modconfig set ai_model llama2 |
llama2 |
ollama_host |
Ollama server URL | /modconfig set ollama_host http://localhost:11434 |
http://localhost:11434 |
| Parameter | Description | Example | Default |
|---|---|---|---|
warn_1_decay_days |
Days for 1 warning to decay | /modconfig set warn_1_decay_days 7 |
7 |
warn_2_decay_days |
Days for 2 warnings to decay | /modconfig set warn_2_decay_days 14 |
14 |
warn_3_decay_days |
Days for 3 warnings to decay | /modconfig set warn_3_decay_days 21 |
21 |
| Parameter | Description | Example | Default |
|---|---|---|---|
mute_duration_2 |
Auto-mute duration at 2 warns (seconds) | /modconfig set mute_duration_2 3600 |
3600 (1 hour) |
mute_duration_3 |
Auto-mute duration at 3 warns (seconds) | /modconfig set mute_duration_3 86400 |
86400 (24 hours) |
| Parameter | Description | Example |
|---|---|---|
rules_message_id |
Message ID containing server rules (for AI context) | /modconfig set rules_message_id 123456789 |
Method 1: Slash Command
/warn @user <reason>
Example:
/warn @JohnDoe Spam in #general
Method 2: Context Menu
- Right-click on the offending message
- Click "Apps" → "Warn User"
- Enter additional notes (optional)
- Confirm
What Happens:
- Warning count incremented
- User receives DM notification
- Action logged in mod-log
- Automatic mute applied if at 2 or 3 warnings
- Message can be deleted (context menu only)
/warns @user
Shows:
- Current warning count
- Full moderation history
- Time until next decay
- All previous actions
/unwarn @user [reason]
Example:
/unwarn @JohnDoe Appeal approved - mistake
What Happens:
- Warning count decremented
- If count reaches 0, active mute removed
- Action logged in mod-log
- User not notified (intentional - moderator discretion)
/mute @user <duration> <reason>
Examples:
/mute @JohnDoe 1h Spamming voice channels
/mute @JohnDoe 30m Disrupting discussion
/mute @JohnDoe 2d Repeated violations
Duration Format:
1h= 1 hour30m= 30 minutes1d= 1 day2h30m= 2 hours 30 minutes
/unmute @user
Removes active mute immediately.
Server-wide logs (recent 20 actions):
/modlog
User-specific logs:
/modlog @user
Appeals appear in the configured appeal channel with:
- User information
- Current warning count
- Appeal reason
- Recent moderation history
Actions:
- Click ✅ Approve to accept appeal (removes 1 warning)
- Click ❌ Deny to reject appeal (opens modal for reason)
What Happens on Approval:
- 1 warning removed
- If count reaches 0, mute removed
- User receives DM with decision
- Action logged
What Happens on Denial:
- User receives DM with decision and reason
- No changes to warning count
- Action logged
When you receive a warning:
- You'll receive a DM explaining the reason
- The message shows your current warning count
- You can read server rules (if configured)
- You can appeal if you believe it's unjustified
- 1 warning: Just a notification
- 2 warnings: Automatically muted for 1 hour
- 3 warnings: Automatically muted for 24 hours
- 4+ warnings: Moderators will decide next steps
- Applied automatically at 2 and 3 warnings
- You'll receive a DM explaining:
- Why you were muted
- How long the mute lasts
- When it expires
- Cannot be manually removed (must wait for expiration)
Good news! Warnings expire over time:
- If you have 1 warning: Expires in 7 days
- If you have 2 warnings: Expires in 14 days
- If you have 3 warnings: Expires in 21 days
- If you have 4+ warnings: Expires in 28 days
When a warning expires:
- You'll receive a DM notification
- Your warning count decreases by 1
- If you reach 0 warnings, any active mute is removed
If you believe a warning was unjustified:
/appeal <your reason>
Example:
/appeal I was banned for spam but I was sharing a relevant resource for the discussion topic. I didn't intend to spam and won't repeat this if it's against the rules.
Requirements:
- Maximum 1000 characters
- Can only appeal if you have active warnings
- Can only have 1 pending appeal at a time
- Must wait 48 hours between appeals
What Happens:
- Your appeal is sent to moderators
- You receive confirmation DM
- Moderators review with your full history
- You receive DM with their decision
If Approved:
- 1 warning removed
- If count reaches 0, mute removed
- Moderator explains decision
If Denied:
- Warning count unchanged
- Moderator explains reason
- Can contact administrator for escalation
- Message Analysis: Every message analyzed by Ollama AI
- Scoring: AI scores 0-100 based on server rules and content
- Flagging: Messages above threshold flagged for review
- Moderator Review: Human moderator reviews and decides action
The AI assigns risk levels based on score:
| Score | Risk Level | Meaning |
|---|---|---|
| 0-39 | 🟢 Info | Generally acceptable, may be worth noting |
| 40-59 | 🟡 Low | Borderline content, context needed |
| 60-79 | 🟠 Medium | Likely violation, should review |
| 80-100 | 🔴 High | Clear violation, immediate attention |
- Toxicity: Insults, aggression, negativity
- Spam: Repetitive, promotional, low-value
- NSFW: Adult content, inappropriate material
- Harassment: Targeted attacks, bullying
- Misinformation: False or misleading information
- None: No violation detected
When reviewing an AI flag:
⚠️ WARN: Opens warn modal, issues warning immediately- 🔍 REVIEW: Mark as reviewing, shows conversation context
- ✅ IGNORE: Mark as false positive, removes from queue
Enable AI:
/modconfig set ai_enabled true
Set Threshold:
/modconfig set ai_confidence_threshold <0-100>
- Higher threshold (70-80): Fewer flags, catches only obvious violations
- Medium threshold (60-70): Balanced approach (recommended)
- Lower threshold (40-60): More flags, catches borderline content
Set AI Flag Channel:
/modconfig set ai_flag_channel #ai-flags
Configure Server Rules:
/modconfig set rules_message_id <message_id>
To get message ID:
- Enable Developer Mode in Discord settings
- Right-click the rules message
- Click "Copy Message ID"
- Use in command above
✅ AI Never:
- Auto-deletes messages
- Auto-mutes users
- Auto-kicks or bans
- Takes any action without moderator approval
✅ AI Always:
- Requires human review
- Provides reasoning for flags
- Uses conservative thresholds
- Continues bot operation if unavailable
- Start Conservative: Begin with threshold 70-75, lower if needed
- Monitor Regularly: Check AI flags daily
- Provide Feedback: Mark false positives as "ignore"
- Context Matters: AI doesn't understand context perfectly
- Trust but Verify: Review AI reasoning before taking action
- Technical/Code Content: May flag code snippets
- Sarcasm/Jokes: May miss humor context
- Non-English: May struggle with other languages
- Quoted Content: May flag quotes of violations
Solution: Click "Ignore" and the flag is logged as false positive.
The moderation system uses 6 tables:
- warnings: Current warning count per user/guild
- warning_history: Immutable audit trail
- moderation_appeals: Appeal submissions and decisions
- moderation_config: Per-guild configuration
- ai_flags: AI-flagged messages for review
- active_mutes: Current mutes with expiration
Warning Decay Task (runs every 6 hours):
- Checks all users with warnings
- Calculates decay deadlines
- Decrements warnings if deadline passed
- Removes mutes if count reaches 0
- Sends DM notifications
- Logs all actions
Mute Expiration Task (runs every minute):
- Checks for expired mutes
- Removes Discord timeouts
- Cleans up database
- Sends DM notifications
- Logs all actions
You can adjust how quickly warnings decay:
/modconfig set warn_1_decay_days 5 # Faster redemption
/modconfig set warn_2_decay_days 10 # Proportional increase
/modconfig set warn_3_decay_days 20 # Longer for repeat offenses
Adjust automatic mute durations (in seconds):
/modconfig set mute_duration_2 7200 # 2 hours for 2 warnings
/modconfig set mute_duration_3 172800 # 48 hours for 3 warnings
Common durations:
- 1 hour = 3600
- 2 hours = 7200
- 12 hours = 43200
- 24 hours = 86400
- 48 hours = 172800
- 7 days = 604800
Each guild has independent configuration:
- Configure each server separately
- No cross-server data sharing
- Different AI thresholds per server
- Different decay rates per server
You can use different AI models:
/modconfig set ai_model llama3.1
/modconfig set ai_model mistral
/modconfig set ai_model codellama
Recommended Models:
llama2: Good balance, default choicellama3.1: More accurate, requires more resourcesmistral: Faster, good for high-traffic serversorca-mini: Lightweight, good for low-resource servers
If running Ollama on another machine:
/modconfig set ollama_host http://192.168.1.100:11434
Symptoms: AI enabled but no messages being flagged
Solutions:
- Check Ollama is running:
curl http://localhost:11434 - Verify threshold not too high:
/modconfig view - Check AI flag channel configured:
/modconfig view - Check bot logs for Ollama errors
- Test with obviously problematic message
Symptoms: Warnings not expiring after configured time
Solutions:
- Check warning decay task is running (check bot logs)
- Verify decay days configured:
/modconfig view - Check warning update timestamp:
/warns @user - Restart bot to restart background tasks
Symptoms: Mute not removed after duration
Solutions:
- Check mute expiration task is running
- Verify bot has "Moderate Members" permission
- Check active_mutes table has correct expiration
- Restart bot to restart background tasks
Symptoms: User submits appeal but moderators don't see it
Solutions:
- Check appeal channel configured:
/modconfig view - Verify bot has permission to send in appeal channel
- Check bot has "Embed Links" permission
- User may have pending appeal already
Symptoms: Users not receiving DM notifications
Solutions:
- User may have DMs disabled
- User may have blocked the bot
- Check bot has "Send Messages" permission for DMs
- This is expected behavior - bot handles gracefully
Symptoms: "Warn User" not in Apps menu
Solutions:
- Ensure bot commands are synced
- Check you have "Moderate Members" permission
- Try restarting Discord client
- Commands may take up to 1 hour to sync globally
Symptoms: Errors in logs about AI analysis timeout
Solutions:
- Check Ollama server performance
- Increase timeout in code if needed
- Use lighter AI model
- Disable AI if server overloaded
- Check this documentation
- Review bot logs in
discord.log - Check database with SQLite browser
- Create issue on GitHub with:
- Bot version
- Error messages
- Steps to reproduce
Contributions welcome! Areas for improvement:
- Additional AI models support
- More detailed analytics
- Export/import configurations
- Multi-language support
- Advanced reporting
This moderation system is part of ISROBOT and uses the same license as the main project.
- Discord.py for Discord API
- Ollama for local AI inference
- SQLite for database
- The ISROBOT community
Last Updated: November 2025