@extends('layouts.app-sidebar') @section('content')
Back to Dashboard

Moderation

Protect your chat from spam and inappropriate content

{{ $moderationStats['total_warnings'] ?? 0 }}

Warnings

{{ $moderationStats['total_timeouts'] ?? 0 }}

Timeouts

{{ ($moderationStats['by_type']['adult_content'] ?? 0) + ($moderationStats['by_type']['harassment'] ?? 0) }}

Adult/Harassment

{{ $moderationStats['by_type']['spam'] ?? 0 }}

Spam

AI Moderation
{{ $tenant->ai_moderation_enabled ? 'ON' : 'OFF' }}
Spam Protection
{{ $tenant->spam_protection_enabled ? 'ON' : 'OFF' }}
Custom Keywords
{{ $keywords->count() }} active
@if($warnings->isNotEmpty())

Active Warnings

Users with recent violations (last 24 hours)

@foreach($warnings->take(10) as $warning) @php $typeColors = [ 'banned_keyword' => 'bg-amber-500/10 text-amber-400', 'spam' => 'bg-blue-500/10 text-blue-400', 'adult_content' => 'bg-pink-500/10 text-pink-400', 'harassment' => 'bg-red-500/10 text-red-400', ]; $typeLabels = [ 'banned_keyword' => 'Keyword', 'spam' => 'Spam', 'adult_content' => 'Adult', 'harassment' => 'Harassment', ]; @endphp
{{ $warning->user_name }} {{ $typeLabels[$warning->violation_type] ?? $warning->violation_type }}
{{ $warning->warning_count }}x {{ $warning->expires_at->diffForHumans() }}
@endforeach
@else

All Clear!

No active warnings in the last 24 hours

@endif

AI-Powered Moderation

Automatically detect adult content, harassment & profanity

@csrf

Enable AI Moderation

Auto-detect inappropriate content using AI

How it works: DayBot uses {{ ($moderationKeywords['adult_content'] ?? 0) + ($moderationKeywords['sexual_request'] ?? 0) + ($moderationKeywords['abuse'] ?? 0) + ($moderationKeywords['harassment'] ?? 0) }}+ keywords + OpenAI moderation API to detect violations. Moderators and channel owner are always protected.

Global Keywords Database

{{ $globalModerationKeywords->count() }} keywords for detecting violations

@csrf

Severity Timeout Settings

@csrf
@php $categoryLabels = [ 'adult_content' => ['label' => 'Adult Content', 'color' => 'pink'], 'sexual_request' => ['label' => 'Sexual Request', 'color' => 'rose'], 'abuse' => ['label' => 'Abuse', 'color' => 'red'], 'harassment' => ['label' => 'Harassment', 'color' => 'orange'], ]; @endphp @foreach($categoryLabels as $category => $meta) @php $categoryKeywords = $globalModerationKeywords->where('category', $category); @endphp @if($categoryKeywords->count() > 0)

{{ $meta['label'] }} ({{ $categoryKeywords->count() }})

@foreach($categoryKeywords as $kw) {{ $kw->keyword }} @endforeach
@endif @endforeach

Spam Protection

Auto-timeout users who spam repeated messages

@csrf

Enable Spam Protection

Automatically timeout users who spam

Repeated messages to trigger

Seconds

{{ round(($tenant->spam_timeout_duration ?? 300) / 60) }} minutes

Example: If someone sends the same message {{ $tenant->spam_message_limit ?? 3 }} times within {{ $tenant->spam_time_window ?? 30 }} seconds, they'll be timed out for {{ round(($tenant->spam_timeout_duration ?? 300) / 60) }} minutes.

Add Custom Keyword

Words or phrases that trigger warnings

@csrf

Warn First

Give warning before taking action

Your Custom Keywords

{{ $keywords->count() }} keyword(s) configured

@if($keywords->count() > 0)
@foreach($keywords as $keyword)
{{ $keyword->keyword }}
@if(($keyword->action_type ?? 'timeout') === 'hide') Hide @else {{ round($keyword->timeout_duration / 60) }}m @endif @if($keyword->warn_first ?? true) Warn @else Instant @endif
{{ $keyword->is_enabled ? 'Active' : 'Off' }}
@csrf
@csrf @method('DELETE')
@endforeach
@else

No custom keywords

Add keywords above to start moderating

@endif
@endsection