import { BaseLayout } from "../views/layout"; import { AuroraClient } from "@/lib/BotClient"; import { getRecentLogs } from "@/lib/logger"; export function dashboardRoute(): Response { // Gather real data const guildCount = AuroraClient.guilds.cache.size; const userCount = AuroraClient.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0); const commandCount = AuroraClient.commands.size; const ping = AuroraClient.ws.ping; // Real system metrics const memoryUsage = (process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2); const uptimeSeconds = process.uptime(); const uptime = new Date(uptimeSeconds * 1000).toISOString().substr(11, 8); // HH:MM:SS // Real activity logs const activityLogs = getRecentLogs(); const content = `