; ========================================== ; KTP Discord Configuration ; ========================================== ; ; Shared configuration for all KTP plugins with Discord integration: ; - KTPMatchHandler (match events, pauses, disconnects) ; - KTPAdminAudit (RCON Kick Monitoring) ; - KTPCvarChecker (cvar violation logging) ; - KTPFileChecker (file inconsistency logging) ; ; SECURITY NOTES: ; - This file contains sensitive authentication data ; - DO NOT commit discord.ini to git (already in .gitignore) ; - Keep this file readable only by the server process ; ; To disable Discord integration, leave this file empty or delete it. ; ; ========================================== ; ########################################################################## ; # REQUIRED SETTINGS # ; ########################################################################## ; Discord Relay Service URL ; Format: https://your-relay.run.app/reply discord_relay_url = https://discord-relay-78814186981.us-central1.run.app/reply ; Authentication Secret (must match RELAY_SHARED_SECRET on Cloud Run) discord_auth_secret = ff661895111b948c8d5b6d732a50bbfff58e93798b4d4ecf0fc0d12f6c4db18e ; ########################################################################## ; # MATCH NOTIFICATION CHANNELS # ; # (KTPMatchHandler only) # ; ########################################################################## ; ; These channels receive match events: start, pause, unpause, disconnect, end ; KTPMatchHandler selects the channel based on match type. ; Default channel - Used for competitive matches ; Also used as fallback if match-type-specific channel not configured discord_channel_id = 1440111718192648324 ; 12-man match channel (optional) ; Used when match started with /start12man ; Falls back to discord_channel_id if not set discord_channel_id_12man = 1457868631881945345 ; Scrim match channel (optional) ; Used when match started with /startscrim ; Falls back to discord_channel_id if not set ;discord_channel_id_scrim = ; Draft match channel (optional) ; Used when match started with /startdraft ; No fallback - draft requires explicit channel discord_channel_id_draft = 1092158706168365178 ; ########################################################################## ; # AUDIT LOG CHANNELS # ; # (KTPAdminKick, KTPAdminAudit, KTPCvarChecker, KTPFileChecker) # ; ########################################################################## ; ; Audit messages are sent to ALL channels listed below. ; This allows you to have multiple audit logs (e.g., public + private). ; ; Audit events include: ; - Admin kicks and bans (KTPAdminKick) ; - RCON command usage (KTPAdminAudit) ; - Cvar violations (KTPCvarChecker) ; - File inconsistencies/cheats (KTPFileChecker) ; ; Any key matching "discord_channel_id_audit*" is collected. ; The "discord_channel_id_admin" key is also added to audit channels. ; Primary audit channel - All audit events go here discord_channel_id_audit = 1458222926586446059 ; External audit channel - Also receives all audit events discord_channel_id_audit_external = 1457951326666489996 ; Competitive match audit (optional) ;discord_channel_id_audit_competitive = ; 12-man match audit (optional) ;discord_channel_id_audit_12man = ; Scrim match audit (optional) ;discord_channel_id_audit_scrim = ; Admin-only channel (optional) - Also receives all audit events ;discord_channel_id_admin = ; ########################################################################## ; # SETUP INSTRUCTIONS # ; ########################################################################## ; ; 1. GET YOUR DISCORD RELAY URL: ; - This is your Google Cloud Run deployment URL ; - Format: https://your-relay-XXXXX.run.app/reply ; - The /reply endpoint is required ; ; 2. GET YOUR DISCORD CHANNEL ID: ; - In Discord: User Settings > Advanced > Enable Developer Mode ; - Right-click on the target channel > Copy ID ; - Paste the 18-digit number in the appropriate setting above ; ; 3. GET YOUR AUTHENTICATION SECRET: ; - This is the RELAY_SHARED_SECRET from your Cloud Run deployment ; - Run: gcloud run services describe ktp-relay --region us-central1 \ ; --format="value(spec.template.spec.containers[0].env[?name=='RELAY_SHARED_SECRET'].value)" ; ; 4. TEST THE CONFIGURATION: ; - Restart your game server ; - Check KTP log for: event=DISCORD_CONFIG_LOAD status=ok ; - Trigger a test event (e.g., /pause in-game) ; - Verify the message appears in Discord ; ########################################################################## ; # TROUBLESHOOTING # ; ########################################################################## ; ; If Discord notifications aren't working: ; ; 1. Check the KTP log for: ; - event=DISCORD_CONFIG_LOAD status=ok loaded=X ; - event=DISCORD_ERROR (indicates a problem) ; ; 2. Verify your relay is running: ; curl https://YOUR_RELAY_URL/health ; Should return: {"ok":true,"time":"..."} ; ; 3. Test the relay manually: ; curl -X POST https://YOUR_RELAY_URL/reply \ ; -H "X-Relay-Auth: YOUR_SECRET" \ ; -H "Content-Type: application/json" \ ; -d '{"channelId":"YOUR_CHANNEL_ID","content":"Test message"}' ; ; 4. Common issues: ; - Wrong channel ID (must be 18 digits) ; - Wrong auth secret (must match Cloud Run env var) ; - Relay URL missing /reply endpoint ; - cURL not available on server