Update the Aethex Sentinel bot's health endpoint from port 8044 to port 8080 in replit.md and src/core/config.ts to comply with Replit's supported ports. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e72fc1b7-94bd-4d6c-801f-cbac2fae245c Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: fe9e5043-1b56-4384-b091-371378a061f1 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/e72fc1b7-94bd-4d6c-801f-cbac2fae245c/yLuYpX9 Replit-Helium-Checkpoint-Created: true
41 lines
1 KiB
TypeScript
41 lines
1 KiB
TypeScript
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');
|
|
}
|