224 lines
6.3 KiB
YAML
224 lines
6.3 KiB
YAML
# Guild Configuration Schema
|
|
# This defines the structure and validation rules for guild configurations
|
|
|
|
type: object
|
|
required:
|
|
- guild_id
|
|
- name
|
|
- settings
|
|
|
|
properties:
|
|
guild_id:
|
|
type: integer
|
|
description: "Discord guild (server) ID"
|
|
minimum: 1
|
|
|
|
name:
|
|
type: string
|
|
description: "Human-readable guild name"
|
|
maxLength: 100
|
|
|
|
owner_id:
|
|
type: integer
|
|
description: "Guild owner's Discord user ID"
|
|
minimum: 1
|
|
|
|
premium:
|
|
type: boolean
|
|
description: "Whether this guild has premium features"
|
|
default: false
|
|
|
|
settings:
|
|
type: object
|
|
required:
|
|
- general
|
|
- channels
|
|
- roles
|
|
- moderation
|
|
- automod
|
|
- ai_moderation
|
|
- verification
|
|
|
|
properties:
|
|
general:
|
|
type: object
|
|
properties:
|
|
prefix:
|
|
type: string
|
|
description: "Command prefix"
|
|
minLength: 1
|
|
maxLength: 10
|
|
default: "!"
|
|
locale:
|
|
type: string
|
|
description: "Language locale"
|
|
pattern: "^[a-z]{2}$"
|
|
default: "en"
|
|
|
|
channels:
|
|
type: object
|
|
description: "Channel configuration (Discord channel IDs)"
|
|
properties:
|
|
log_channel_id:
|
|
type: [integer, "null"]
|
|
description: "General event log channel"
|
|
minimum: 1
|
|
mod_log_channel_id:
|
|
type: [integer, "null"]
|
|
description: "Moderation action log channel"
|
|
minimum: 1
|
|
welcome_channel_id:
|
|
type: [integer, "null"]
|
|
description: "Welcome message channel"
|
|
minimum: 1
|
|
|
|
roles:
|
|
type: object
|
|
description: "Role configuration (Discord role IDs)"
|
|
properties:
|
|
mute_role_id:
|
|
type: [integer, "null"]
|
|
description: "Role for timed-out members"
|
|
minimum: 1
|
|
verified_role_id:
|
|
type: [integer, "null"]
|
|
description: "Role given after verification"
|
|
minimum: 1
|
|
mod_role_ids:
|
|
type: array
|
|
description: "Moderator roles"
|
|
items:
|
|
type: integer
|
|
minimum: 1
|
|
default: []
|
|
|
|
moderation:
|
|
type: object
|
|
properties:
|
|
automod_enabled:
|
|
type: boolean
|
|
description: "Enable automatic moderation"
|
|
default: true
|
|
anti_spam_enabled:
|
|
type: boolean
|
|
description: "Enable anti-spam protection"
|
|
default: true
|
|
link_filter_enabled:
|
|
type: boolean
|
|
description: "Enable link filtering"
|
|
default: false
|
|
strike_actions:
|
|
type: object
|
|
description: "Actions to take at strike thresholds"
|
|
patternProperties:
|
|
"^[0-9]+$":
|
|
type: object
|
|
required: [action]
|
|
properties:
|
|
action:
|
|
type: string
|
|
enum: [warn, timeout, kick, ban]
|
|
duration:
|
|
type: integer
|
|
minimum: 1
|
|
description: "Duration in seconds (for timeout/ban)"
|
|
default:
|
|
"1": {action: warn}
|
|
"3": {action: timeout, duration: 3600}
|
|
"5": {action: kick}
|
|
"7": {action: ban}
|
|
|
|
automod:
|
|
type: object
|
|
description: "Automatic moderation settings"
|
|
properties:
|
|
message_rate_limit:
|
|
type: integer
|
|
minimum: 1
|
|
maximum: 50
|
|
description: "Messages per time window"
|
|
default: 5
|
|
message_rate_window:
|
|
type: integer
|
|
minimum: 1
|
|
maximum: 300
|
|
description: "Time window in seconds"
|
|
default: 5
|
|
duplicate_threshold:
|
|
type: integer
|
|
minimum: 1
|
|
maximum: 20
|
|
description: "Duplicate messages to trigger action"
|
|
default: 3
|
|
mention_limit:
|
|
type: integer
|
|
minimum: 1
|
|
maximum: 50
|
|
description: "Maximum mentions per message"
|
|
default: 5
|
|
mention_rate_limit:
|
|
type: integer
|
|
minimum: 1
|
|
maximum: 100
|
|
description: "Mentions per time window"
|
|
default: 10
|
|
mention_rate_window:
|
|
type: integer
|
|
minimum: 1
|
|
maximum: 3600
|
|
description: "Mention time window in seconds"
|
|
default: 60
|
|
scam_allowlist:
|
|
type: array
|
|
description: "Domains allowed to bypass scam detection"
|
|
items:
|
|
type: string
|
|
pattern: "^[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
|
|
default: []
|
|
|
|
ai_moderation:
|
|
type: object
|
|
description: "AI-powered moderation settings"
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
description: "Enable AI moderation"
|
|
default: true
|
|
sensitivity:
|
|
type: integer
|
|
minimum: 0
|
|
maximum: 100
|
|
description: "AI sensitivity level (higher = stricter)"
|
|
default: 80
|
|
confidence_threshold:
|
|
type: number
|
|
minimum: 0.0
|
|
maximum: 1.0
|
|
description: "Minimum confidence to take action"
|
|
default: 0.7
|
|
log_only:
|
|
type: boolean
|
|
description: "Only log violations, don't take action"
|
|
default: false
|
|
nsfw_detection_enabled:
|
|
type: boolean
|
|
description: "Enable NSFW image detection"
|
|
default: true
|
|
nsfw_only_filtering:
|
|
type: boolean
|
|
description: "Only filter sexual content, allow violence/harassment"
|
|
default: false
|
|
|
|
verification:
|
|
type: object
|
|
description: "Member verification settings"
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
description: "Enable verification for new members"
|
|
default: false
|
|
type:
|
|
type: string
|
|
enum: [button, captcha, math, emoji]
|
|
description: "Verification challenge type"
|
|
default: button |