# kikysena13/dc architecture

> Architecture diagram of the GitHub repository kikysena13/dc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kikysena13/dc
- Repository: https://github.com/kikysena13/dc

## Overview

This is a Discord community bot with two runtime variants: the root bot and a parallel bot under `l/`. The main workflow is a member issuing a Discord command, the bot dispatching it to a command handler, and the handler replying in Discord or updating community data. Major branches include music playback, arena announcements, spending/profile management, and the HTTP dashboard. Source excerpts show only portions of startup and handlers, so unsampled capabilities are represented at subsystem level and uncertain internal links are omitted.

Main entry points: [`index.js`](https://github.com/kikysena13/dc/blob/main/index.js) (Main bot), [`commands/playmusic.js`](https://github.com/kikysena13/dc/blob/main/commands/playmusic.js) (Music commands), [`commands/whellevi.js`](https://github.com/kikysena13/dc/blob/main/commands/whellevi.js) (Spending commands), [`commands/input.js`](https://github.com/kikysena13/dc/blob/main/commands/input.js) (Profile inputs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot runtimes"]
  node_mainbot["Main bot<br/>[index.js]"]
  node_altbot["Alternate bot<br/>[index.js]"]
  node_httpdash["HTTP dashboard<br/>[index.js]"]
end

subgraph group_community["Community commands"]
  node_general["General commands"]
  node_ai["AI chat<br/>[aiChat.js]"]
  node_arena["Arena and rules<br/>[Arenaplay.js]"]
  node_tasks["Tasks<br/>[tasks.js]"]
  node_activity["Activity and roles<br/>[activity.js]"]
  node_altcommands["Alternate commands"]
end

subgraph group_media["Media features"]
  node_musiccmd["Music commands<br/>[playmusic.js]"]
  node_musicqueue["Playback queue<br/>[playmusic.js]"]
end

subgraph group_spending["Spending and profiles"]
  node_spendingcmd["Spending commands<br/>[whellevi.js]"]
  node_profileinput["Profile inputs<br/>[input.js]"]
  node_points[("Spending records")]
end

subgraph group_integrations["External services"]
  node_gemini["Gemini API"]
  node_github["GitHub contents API"]
  node_spotify["Spotify API"]
  node_audio["Audio sources"]
  node_discord["Discord platform"]
  node_browser(("Dashboard client"))
end

node_member(("Discord member"))

node_member -->|"sends commands"| node_mainbot
node_mainbot -->|"dispatches commands"| node_general
node_mainbot -->|"dispatches commands"| node_ai
node_mainbot -->|"dispatches commands"| node_arena
node_mainbot -->|"dispatches commands"| node_tasks
node_mainbot -->|"dispatches commands"| node_activity
node_mainbot -->|"dispatches commands"| node_musiccmd
node_mainbot -->|"dispatches commands"| node_spendingcmd
node_mainbot -->|"dispatches commands"| node_profileinput
node_altbot -->|"dispatches commands"| node_altcommands
node_musiccmd -->|"manages queue"| node_musicqueue
node_musiccmd -->|"fetches playlists"| node_spotify
node_musiccmd -->|"streams audio"| node_audio
node_ai -->|"requests responses"| node_gemini
node_spendingcmd -->|"reads and writes"| node_points
node_profileinput -.->|"updates profile data"| node_points
node_spendingcmd -->|"syncs records"| node_github
node_profileinput -.->|"syncs profile changes"| node_github
node_browser -.->|"requests dashboard"| node_httpdash
node_httpdash -->|"reads guild data"| node_discord
node_mainbot -->|"connects bot"| node_discord

click node_mainbot "https://github.com/kikysena13/dc/blob/main/index.js"
click node_altbot "https://github.com/kikysena13/dc/blob/main/l/index.js"
click node_httpdash "https://github.com/kikysena13/dc/blob/main/index.js"
click node_general "https://github.com/kikysena13/dc/tree/main/commands"
click node_ai "https://github.com/kikysena13/dc/blob/main/commands/aiChat.js"
click node_arena "https://github.com/kikysena13/dc/blob/main/commands/Arenaplay.js"
click node_tasks "https://github.com/kikysena13/dc/blob/main/commands/tasks.js"
click node_activity "https://github.com/kikysena13/dc/blob/main/commands/activity.js"
click node_altcommands "https://github.com/kikysena13/dc/tree/main/l/commands"
click node_musiccmd "https://github.com/kikysena13/dc/blob/main/commands/playmusic.js"
click node_musicqueue "https://github.com/kikysena13/dc/blob/main/commands/playmusic.js"
click node_spendingcmd "https://github.com/kikysena13/dc/blob/main/commands/whellevi.js"
click node_profileinput "https://github.com/kikysena13/dc/blob/main/commands/input.js"
click node_points "https://github.com/kikysena13/dc/blob/main/data/whellevi-points.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mainbot,node_altbot,node_httpdash toneBlue
class node_general,node_ai,node_arena,node_tasks,node_activity,node_altcommands toneAmber
class node_musiccmd,node_musicqueue toneMint
class node_spendingcmd,node_profileinput,node_points toneRose
class node_gemini,node_github,node_spotify,node_audio,node_discord,node_browser,node_member toneIndigo
```

## Components

### Bot runtimes

- [Main bot](https://github.com/kikysena13/dc/blob/main/index.js): `index.js`
- [Alternate bot](https://github.com/kikysena13/dc/blob/main/l/index.js): `l/index.js`
- [HTTP dashboard](https://github.com/kikysena13/dc/blob/main/index.js): `index.js`

### Community commands

- [General commands](https://github.com/kikysena13/dc/tree/main/commands): `commands`
- [AI chat](https://github.com/kikysena13/dc/blob/main/commands/aiChat.js): `commands/aiChat.js`
- [Arena and rules](https://github.com/kikysena13/dc/blob/main/commands/Arenaplay.js): `commands/Arenaplay.js`
- [Tasks](https://github.com/kikysena13/dc/blob/main/commands/tasks.js): `commands/tasks.js`
- [Activity and roles](https://github.com/kikysena13/dc/blob/main/commands/activity.js): `commands/activity.js`
- [Alternate commands](https://github.com/kikysena13/dc/tree/main/l/commands): `l/commands`

### Media features

- [Music commands](https://github.com/kikysena13/dc/blob/main/commands/playmusic.js): `commands/playmusic.js`
- [Playback queue](https://github.com/kikysena13/dc/blob/main/commands/playmusic.js): `commands/playmusic.js`

### Spending and profiles

- [Spending commands](https://github.com/kikysena13/dc/blob/main/commands/whellevi.js): `commands/whellevi.js`
- [Profile inputs](https://github.com/kikysena13/dc/blob/main/commands/input.js): `commands/input.js`
- [Spending records](https://github.com/kikysena13/dc/blob/main/data/whellevi-points.json): `data/whellevi-points.json`

### External services

- **Gemini API**
- **GitHub contents API**
- **Spotify API**
- **Audio sources**
- **Discord platform**
- **Dashboard client**

### Other components

- **Discord member**

## Connections

- Discord member → Main bot: sends commands (evidence: `index.js`)
- Main bot → General commands: dispatches commands (evidence: `index.js`)
- Main bot → AI chat: dispatches commands (evidence: `index.js`)
- Main bot → Arena and rules: dispatches commands (evidence: `index.js`)
- Main bot → Tasks: dispatches commands (evidence: `index.js`)
- Main bot → Activity and roles: dispatches commands (evidence: `index.js`)
- Main bot → Music commands: dispatches commands (evidence: `index.js`)
- Main bot → Spending commands: dispatches commands (evidence: `index.js`)
- Main bot → Profile inputs: dispatches commands (evidence: `index.js`)
- Alternate bot → Alternate commands: dispatches commands (evidence: `l/index.js`)
- Music commands → Playback queue: manages queue (evidence: `commands/playmusic.js`)
- Music commands → Spotify API: fetches playlists (evidence: `commands/playmusic.js`)
- Music commands → Audio sources: streams audio (evidence: `commands/playmusic.js`)
- AI chat → Gemini API: requests responses (evidence: `commands/aiChat.js`)
- Spending commands → Spending records: reads and writes (evidence: `commands/whellevi.js`)
- Profile inputs → Spending records: updates profile data
- Spending commands → GitHub contents API: syncs records (evidence: `commands/whellevi.js`)
- Profile inputs → GitHub contents API: syncs profile changes
- Dashboard client → HTTP dashboard: requests dashboard
- HTTP dashboard → Discord platform: reads guild data (evidence: `index.js`)
- Main bot → Discord platform: connects bot (evidence: `index.js`)
