Files
GuardDen/config/schemas/wordlists-schema.yml

175 lines
5.2 KiB
YAML

# Wordlists Configuration Schema
# Defines structure for banned words and domain whitelists
banned_words:
type: object
description: "Banned words and patterns configuration"
properties:
global_patterns:
type: array
description: "Patterns applied to all guilds (unless overridden)"
items:
type: object
required: [pattern, action]
properties:
pattern:
type: string
description: "Word or regex pattern to match"
minLength: 1
maxLength: 200
action:
type: string
enum: [delete, warn, strike, timeout]
description: "Action to take when pattern matches"
is_regex:
type: boolean
description: "Whether pattern is a regular expression"
default: false
reason:
type: string
description: "Reason for this rule"
maxLength: 500
category:
type: string
description: "Category of banned content"
enum: [profanity, hate_speech, spam, scam, harassment, sexual, violence]
severity:
type: integer
minimum: 1
maximum: 10
description: "Severity level (1-10)"
default: 5
enabled:
type: boolean
description: "Whether this rule is active"
default: true
guild_patterns:
type: object
description: "Guild-specific pattern overrides"
patternProperties:
"^[0-9]+$": # Guild ID
type: array
items:
type: object
required: [pattern, action]
properties:
pattern:
type: string
minLength: 1
maxLength: 200
action:
type: string
enum: [delete, warn, strike, timeout]
is_regex:
type: boolean
default: false
reason:
type: string
maxLength: 500
category:
type: string
enum: [profanity, hate_speech, spam, scam, harassment, sexual, violence]
severity:
type: integer
minimum: 1
maximum: 10
default: 5
enabled:
type: boolean
default: true
override_global:
type: boolean
description: "Whether this rule overrides global patterns"
default: false
external_sources:
type: object
description: "External wordlist sources configuration"
properties:
sources:
type: array
items:
type: object
required: [name, url, category, action]
properties:
name:
type: string
description: "Unique identifier for this source"
pattern: "^[a-zA-Z0-9_-]+$"
url:
type: string
description: "URL to fetch wordlist from"
format: uri
category:
type: string
enum: [profanity, hate_speech, spam, scam, harassment, sexual, violence]
action:
type: string
enum: [delete, warn, strike, timeout]
reason:
type: string
description: "Default reason for words from this source"
enabled:
type: boolean
default: true
update_interval_hours:
type: integer
minimum: 1
maximum: 8760 # 1 year
description: "How often to update from source"
default: 168 # 1 week
applies_to_guilds:
type: array
description: "Guild IDs to apply this source to (empty = all guilds)"
items:
type: integer
minimum: 1
default: []
domain_allowlists:
type: object
description: "Domain whitelist configuration"
properties:
global_allowlist:
type: array
description: "Domains allowed for all guilds"
items:
type: object
required: [domain]
properties:
domain:
type: string
description: "Domain name to allow"
pattern: "^[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
reason:
type: string
description: "Why this domain is allowed"
added_by:
type: string
description: "Who added this domain"
added_date:
type: string
format: date-time
description: "When this domain was added"
guild_allowlists:
type: object
description: "Guild-specific domain allowlists"
patternProperties:
"^[0-9]+$": # Guild ID
type: array
items:
type: object
required: [domain]
properties:
domain:
type: string
pattern: "^[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
reason:
type: string
added_by:
type: string
added_date:
type: string
format: date-time