Discord bot that plays a live Icecast / AzuraCast stream in a voice channel, tracks ICY metadata, and looks up album info.
Formerly discord-icecast-bot.
!play— join your voice channel and stream!stop— stop and disconnect!song— current title, Genius search link, MusicBrainz album art when available!history— recent titles (paginated)- Auto-leaves when the channel is empty (idle timeout)
- Presence shows the current track
- Python 3.10+
- FFmpeg on
PATH(needed for voice) - A Discord bot token with Message Content Intent enabled
- A public stream URL (listen mount only — never put admin API keys in the bot)
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
# edit .env — DISCORD_TOKEN + STREAM_URL
python -m bot- Create an application → Bot → copy token →
DISCORD_TOKEN - Enable Message Content Intent
- OAuth2 URL Generator →
botscope → permissions: Connect, Speak, Send Messages, Embed Links - Invite the bot to your server
| Variable | Required | Description |
|---|---|---|
DISCORD_TOKEN |
yes | Bot token |
STREAM_URL |
yes | Public Icecast/AzuraCast listen URL |
COMMAND_PREFIX |
no | Default ! |
STREAM_VOLUME |
no | 0.0–1.0 (default 0.5) |
IDLE_TIMEOUT_SECONDS |
no | Leave empty channel after N seconds (default 300) |
HISTORY_SIZE |
no | Titles kept for history (default 50) |
MUSICBRAINZ_USER_AGENT |
no | Identify your bot for the MB API |
- Stream must expose ICY metadata (
icy-metaint) for!song/ presence updates. - MusicBrainz asks for a real User-Agent with contact info — set
MUSICBRAINZ_USER_AGENT. - This is a client of a public mount. Do not ship station admin passwords or private relay URLs.
MIT