feat: API usage in live dashboard + Discord channel names
- Fetch Claude Code usage via OAuth API (five_hour/seven_day) - Fetch Codex usage via app-server JSON-RPC (rateLimits/read) - System resources: CPU%, memory, disk in GB with emoji thresholds - Show actual Discord channel names (#name) instead of DB-stored names - Guard against overlapping usage updates (async API calls)
This commit is contained in:
@@ -464,6 +464,7 @@ export class DiscordChannel implements Channel {
|
||||
const jid = channelIdToJid.get(id);
|
||||
if (!jid || !channel) continue;
|
||||
result.set(jid, {
|
||||
name: channel.name,
|
||||
position: channel.position,
|
||||
category: channel.parent?.name || '',
|
||||
categoryPosition: channel.parent?.position ?? 999,
|
||||
@@ -478,6 +479,7 @@ export class DiscordChannel implements Channel {
|
||||
if (channel && 'position' in channel) {
|
||||
const tc = channel as TextChannel;
|
||||
result.set(jid, {
|
||||
name: tc.name,
|
||||
position: tc.position,
|
||||
category: tc.parent?.name || '',
|
||||
categoryPosition: tc.parent?.position ?? 999,
|
||||
|
||||
Reference in New Issue
Block a user