# seesharpeden/radiohit architecture

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

- Interactive diagram: https://gitdiagram.com/seesharpeden/radiohit
- Repository: https://github.com/seesharpeden/radiohit

## Overview

RadioHit is a Discord bot for playing the WinglessRadio stream in voice channels. Users invoke slash commands; the runtime dispatches each command, with join starting configured audio playback, leave disconnecting, and nowplaying fetching current track metadata. Ping is a separate utility command. The README lists no further implemented capabilities. Relationships shown follow the sampled command calls; the tree includes an example config, but does not expose its values or the radio service endpoints.

Main entry points: [`index.js`](https://github.com/seesharpeden/radiohit/blob/main/index.js) (Command runtime), [`commands/radio/join.js`](https://github.com/seesharpeden/radiohit/blob/main/commands/radio/join.js) (Join playback), [`commands/radio/nowplaying.js`](https://github.com/seesharpeden/radiohit/blob/main/commands/radio/nowplaying.js) (Now playing), [`commands/radio/leave.js`](https://github.com/seesharpeden/radiohit/blob/main/commands/radio/leave.js) (Leave voice)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Discord runtime"]
  node_runtime["Command runtime<br/>[index.js]"]
end

subgraph group_radio["Radio commands"]
  node_join["Join playback<br/>[join.js]"]
  node_leave["Leave voice<br/>[leave.js]"]
  node_nowplaying["Now playing<br/>[nowplaying.js]"]
end

subgraph group_utility["Utility command"]
  node_ping["Ping<br/>[ping.js]"]
end

node_discord_user(("Discord user"))
node_discord["Discord platform"]
node_stream["Radio stream"]
node_radio_api["Radio metadata API"]

node_discord_user -->|"invokes slash command"| node_discord
node_discord -->|"delivers interaction"| node_runtime
node_runtime -->|"dispatches command"| node_join
node_runtime -->|"dispatches command"| node_leave
node_runtime -->|"dispatches command"| node_nowplaying
node_runtime -->|"dispatches command"| node_ping
node_join -->|"plays configured audio"| node_stream
node_join -->|"replies status"| node_discord
node_leave -->|"replies status"| node_discord
node_nowplaying -->|"fetches track data"| node_radio_api
node_nowplaying -->|"replies track details"| node_discord
node_ping -->|"replies pong"| node_discord

click node_runtime "https://github.com/seesharpeden/radiohit/blob/main/index.js"
click node_join "https://github.com/seesharpeden/radiohit/blob/main/commands/radio/join.js"
click node_leave "https://github.com/seesharpeden/radiohit/blob/main/commands/radio/leave.js"
click node_nowplaying "https://github.com/seesharpeden/radiohit/blob/main/commands/radio/nowplaying.js"
click node_ping "https://github.com/seesharpeden/radiohit/blob/main/commands/misc/ping.js"

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_runtime,node_discord_user toneBlue
class node_join,node_leave,node_nowplaying toneAmber
class node_ping,node_radio_api toneMint
class node_discord,node_stream toneIndigo
```

## Components

### Discord runtime

- [Command runtime](https://github.com/seesharpeden/radiohit/blob/main/index.js): `index.js`

### Radio commands

- [Join playback](https://github.com/seesharpeden/radiohit/blob/main/commands/radio/join.js): `commands/radio/join.js`
- [Leave voice](https://github.com/seesharpeden/radiohit/blob/main/commands/radio/leave.js): `commands/radio/leave.js`
- [Now playing](https://github.com/seesharpeden/radiohit/blob/main/commands/radio/nowplaying.js): `commands/radio/nowplaying.js`

### Utility command

- [Ping](https://github.com/seesharpeden/radiohit/blob/main/commands/misc/ping.js): `commands/misc/ping.js`

### Other components

- **Discord user**
- **Discord platform**
- **Radio stream**
- **Radio metadata API**

## Connections

- Discord user → Discord platform: invokes slash command
- Discord platform → Command runtime: delivers interaction (evidence: `index.js`)
- Command runtime → Join playback: dispatches command (evidence: `index.js`)
- Command runtime → Leave voice: dispatches command (evidence: `index.js`)
- Command runtime → Now playing: dispatches command (evidence: `index.js`)
- Command runtime → Ping: dispatches command (evidence: `index.js`)
- Join playback → Radio stream: plays configured audio (evidence: `commands/radio/join.js`)
- Join playback → Discord platform: replies status (evidence: `commands/radio/join.js`)
- Leave voice → Discord platform: replies status (evidence: `commands/radio/leave.js`)
- Now playing → Radio metadata API: fetches track data (evidence: `commands/radio/nowplaying.js`)
- Now playing → Discord platform: replies track details (evidence: `commands/radio/nowplaying.js`)
- Ping → Discord platform: replies pong (evidence: `commands/misc/ping.js`)
