import 'dotenv/config'; export const config = { token: process.env.DISCORD_TOKEN!, guilds: { hub: process.env.HUB_ID!, gameforge: process.env.FORGE_ID!, foundation: process.env.FOUNDATION_ID!, labs: process.env.LABS_ID!, corp: process.env.CORP_ID!, }, security: { heatThreshold: 3, heatWindowMs: 5000, dangerousActions: ['CHANNEL_DELETE', 'BAN_ADD', 'KICK', 'ROLE_DELETE', 'WEBHOOK_DELETE'], whitelistedUsers: process.env.WHITELISTED_USERS?.split(',') || [], }, dashboard: { updateIntervalMs: 5 * 60 * 1000, statusChannelId: process.env.STATUS_CHANNEL_ID, }, health: { port: parseInt(process.env.HEALTH_PORT || '8080'), }, }; export function validateConfig(): void { const required = ['DISCORD_TOKEN']; const missing = required.filter(key => !process.env[key]); if (missing.length > 0) { console.error('❌ Missing required environment variables:', missing.join(', ')); process.exit(1); } console.log('✅ Configuration validated'); }