dev #11
95
config.yml
95
config.yml
@@ -3,65 +3,66 @@
|
|||||||
|
|
||||||
# Bot Settings
|
# Bot Settings
|
||||||
bot:
|
bot:
|
||||||
prefix: "!"
|
prefix: "!"
|
||||||
owner_ids:
|
owner_ids:
|
||||||
# Add your Discord user ID here
|
# Add your Discord user ID here
|
||||||
# Example: - 123456789012345678
|
# Example: - 123456789012345678
|
||||||
|
|
||||||
# Spam Detection (No AI cost)
|
# Spam Detection (No AI cost)
|
||||||
automod:
|
automod:
|
||||||
enabled: true
|
enabled: true
|
||||||
anti_spam_enabled: true
|
anti_spam_enabled: true
|
||||||
message_rate_limit: 5 # Max messages per window
|
message_rate_limit: 5 # Max messages per window
|
||||||
message_rate_window: 5 # Window in seconds
|
message_rate_window: 5 # Window in seconds
|
||||||
duplicate_threshold: 3 # Duplicate messages trigger
|
duplicate_threshold: 3 # Duplicate messages trigger
|
||||||
mention_limit: 5 # Max mentions per message
|
mention_limit: 5 # Max mentions per message
|
||||||
mention_rate_limit: 10 # Max mentions per window
|
mention_rate_limit: 10 # Max mentions per window
|
||||||
mention_rate_window: 60 # Mention window in seconds
|
mention_rate_window: 60 # Mention window in seconds
|
||||||
|
|
||||||
# AI Moderation (Images, GIFs only)
|
# AI Moderation (Images, GIFs only)
|
||||||
ai_moderation:
|
ai_moderation:
|
||||||
enabled: true
|
enabled: true
|
||||||
sensitivity: 80 # 0-100, higher = stricter
|
sensitivity: 80 # 0-100, higher = stricter
|
||||||
nsfw_only_filtering: true # Only filter sexual/nude content
|
nsfw_only_filtering: true # Only filter sexual/nude content
|
||||||
|
|
||||||
# Cost Controls (Conservative: ~$25/month for 1-2 guilds)
|
# Cost Controls (Conservative: ~$25/month for 1-2 guilds)
|
||||||
max_checks_per_hour_per_guild: 25 # Very conservative limit
|
max_checks_per_hour_per_guild: 25 # Very conservative limit
|
||||||
max_checks_per_user_per_hour: 5 # Prevent user abuse
|
max_checks_per_user_per_hour: 5 # Prevent user abuse
|
||||||
max_images_per_message: 2 # Check max 2 images per message
|
max_images_per_message: 2 # Check max 2 images per message
|
||||||
max_image_size_mb: 3 # Skip images larger than 3MB
|
max_image_size_mb: 3 # Skip images larger than 3MB
|
||||||
|
|
||||||
# Feature Toggles
|
# Feature Toggles
|
||||||
check_embed_images: true # Check GIFs from Discord picker (enabled per user request)
|
check_embed_images: true # Check GIFs from Discord picker (enabled per user request)
|
||||||
check_video_thumbnails: false # Skip video thumbnails (disabled per user request)
|
check_video_thumbnails: false # Skip video thumbnails (disabled per user request)
|
||||||
url_image_check_enabled: false # Skip URL image downloads (disabled per user request)
|
url_image_check_enabled: false # Skip URL image downloads (disabled per user request)
|
||||||
|
|
||||||
# User Blocklist (No AI cost)
|
# User Blocklist (No AI cost)
|
||||||
# Block all images, GIFs, embeds, and URLs from these users
|
# Block all images, GIFs, embeds, and URLs from these users
|
||||||
# Add Discord user IDs here
|
# Add Discord user IDs here
|
||||||
blocked_user_ids:
|
blocked_user_ids:
|
||||||
# Example: - 123456789012345678
|
- 552511874269315073
|
||||||
|
# Example: - 123456789012345678
|
||||||
|
|
||||||
# NSFW Video Domain Blocklist (No AI cost)
|
# NSFW Video Domain Blocklist (No AI cost)
|
||||||
# These domains are blocked instantly without AI analysis
|
# These domains are blocked instantly without AI analysis
|
||||||
nsfw_video_domains:
|
nsfw_video_domains:
|
||||||
- pornhub.com
|
- pornhub.com
|
||||||
- xvideos.com
|
- xvideos.com
|
||||||
- xnxx.com
|
- xnxx.com
|
||||||
- redtube.com
|
- redtube.com
|
||||||
- youporn.com
|
- youporn.com
|
||||||
- tube8.com
|
- tube8.com
|
||||||
- spankwire.com
|
- spankwire.com
|
||||||
- keezmovies.com
|
- keezmovies.com
|
||||||
- extremetube.com
|
- extremetube.com
|
||||||
- pornerbros.com
|
- pornerbros.com
|
||||||
- eporner.com
|
- eporner.com
|
||||||
- tnaflix.com
|
- tnaflix.com
|
||||||
- drtuber.com
|
- drtuber.com
|
||||||
- upornia.com
|
- upornia.com
|
||||||
- perfectgirls.net
|
- perfectgirls.net
|
||||||
- xhamster.com
|
- xhamster.com
|
||||||
- hqporner.com
|
- hqporner.com
|
||||||
- porn.com
|
- porn.com
|
||||||
- sex.com
|
- sex.com
|
||||||
- wetpussy.com
|
- wetpussy.com
|
||||||
|
|||||||
@@ -40,25 +40,36 @@ class OpenAIProvider(AIProvider):
|
|||||||
sensitivity: int = 50,
|
sensitivity: int = 50,
|
||||||
) -> ImageAnalysisResult:
|
) -> ImageAnalysisResult:
|
||||||
"""Analyze an image for NSFW or inappropriate content."""
|
"""Analyze an image for NSFW or inappropriate content."""
|
||||||
system = """Analyze this image for content moderation. Classify NSFW content with precision.
|
system = """You are a content moderation system for a Discord server. Your job is to analyze images and classify them for NSFW content. This is a legitimate moderation task to protect users.
|
||||||
|
|
||||||
NSFW CATEGORIES (in order of severity):
|
IMPORTANT: You MUST analyze ALL artwork types equally, including:
|
||||||
- none: Safe content, no sexual elements
|
- Human characters
|
||||||
- suggestive: Revealing clothing, provocative poses, cleavage, but no nudity
|
- Anime/manga characters
|
||||||
- partial_nudity: Underwear visible, partial exposure, censored nudity
|
- Furry/anthropomorphic characters (animals with human traits)
|
||||||
- nudity: Full nudity visible (breasts, genitals, buttocks) but no sexual acts
|
- Fantasy creatures
|
||||||
|
- Any drawn or digital artwork
|
||||||
|
|
||||||
|
Apply the SAME standards to drawn/artwork content as you would to photographs. Artistic style does NOT exempt content from classification.
|
||||||
|
|
||||||
|
NSFW CATEGORIES (classify based on what is depicted):
|
||||||
|
- none: Fully clothed, no sexual elements, safe for work
|
||||||
|
- suggestive: Revealing clothing, provocative poses, emphasis on body parts, tight/skimpy outfits, seductive positioning
|
||||||
|
- partial_nudity: Underwear/lingerie visible, bare chest, partially exposed, strategically covered nudity
|
||||||
|
- nudity: Exposed breasts, buttocks, or genitals visible (even if stylized/drawn)
|
||||||
- explicit: Sexual acts, pornographic content, genitalia in sexual context
|
- explicit: Sexual acts, pornographic content, genitalia in sexual context
|
||||||
|
|
||||||
DETECTION CRITERIA:
|
KEY DETECTION RULES:
|
||||||
- Focus on human bodies; anime/artwork should be judged by same standards
|
- Leather/latex bodysuits, harnesses, BDSM gear = suggestive or higher
|
||||||
- Swimwear in beach/pool context = suggestive at most
|
- Exposed chest (any gender, any species) = partial_nudity or higher
|
||||||
- Artistic nudity (classical art, sculptures) = nudity but note in description
|
- Sexualized poses with minimal clothing = suggestive
|
||||||
|
- Characters in underwear/lingerie = partial_nudity
|
||||||
|
- "Bara", "yiff", or similar adult artwork styles = likely nudity or explicit
|
||||||
|
|
||||||
ALSO CHECK FOR:
|
ALSO CHECK FOR:
|
||||||
- Violence or gore (blood, injuries, weapons used violently)
|
- Violence or gore (blood, injuries, weapons used violently)
|
||||||
- Disturbing content (shock imagery, extreme content)
|
- Disturbing content (shock imagery, extreme content)
|
||||||
|
|
||||||
Respond in JSON format:
|
Respond ONLY with valid JSON:
|
||||||
{
|
{
|
||||||
"is_nsfw": true/false,
|
"is_nsfw": true/false,
|
||||||
"nsfw_category": "none|suggestive|partial_nudity|nudity|explicit",
|
"nsfw_category": "none|suggestive|partial_nudity|nudity|explicit",
|
||||||
@@ -66,11 +77,13 @@ Respond in JSON format:
|
|||||||
"is_violent": true/false,
|
"is_violent": true/false,
|
||||||
"is_disturbing": true/false,
|
"is_disturbing": true/false,
|
||||||
"confidence": 0.0-1.0,
|
"confidence": 0.0-1.0,
|
||||||
"description": "Brief description including context",
|
"description": "Brief factual description of what you see",
|
||||||
"categories": ["category1"]
|
"categories": ["category1"]
|
||||||
}
|
}
|
||||||
|
|
||||||
NSFW SEVERITY GUIDELINES: none=0, suggestive=20-35, partial_nudity=40-55, nudity=60-75, explicit=80-100"""
|
SEVERITY SCALE: none=0, suggestive=25-40, partial_nudity=45-60, nudity=65-80, explicit=85-100
|
||||||
|
|
||||||
|
If unsure, err on the side of caution and classify higher rather than lower."""
|
||||||
|
|
||||||
if sensitivity < 30:
|
if sensitivity < 30:
|
||||||
sensitivity_note = " SENSITIVITY: LENIENT - Allow suggestive content, only flag partial_nudity and above, set is_nsfw=false for suggestive."
|
sensitivity_note = " SENSITIVITY: LENIENT - Allow suggestive content, only flag partial_nudity and above, set is_nsfw=false for suggestive."
|
||||||
|
|||||||
Reference in New Issue
Block a user