wip music bot for mumble
- Python 100%
| commands | ||
| handlers | ||
| reverb_types | ||
| scrobbling | ||
| .env.example | ||
| .gitignore | ||
| certificate.py | ||
| filter_rules.py | ||
| LICENSE | ||
| main.py | ||
| managers.py | ||
| pyproject.toml | ||
| README.md | ||
| utils.py | ||
reverb
mumble music bot
Features
- Play music from YouTube and Spotify*
- Queue management
- Last.fm scrobbling
- WebSocket API for externally controlling the queue
*uses YouTube for content
Setup
Prerequisites
- uv
- ffmpeg (with opus support)
- a mumble server
- Linux (Windows is not supported)
Installation
- Clone the repository
- Rename .env.example to .env and configure it
Running
uv run main.py
Commands
play <query>- Search YouTube and add songs to queuequeue- Show current queueskip (tracks)- Skip current songremove (track number)- Remove track from queuepause/resume- Pause/resume playbackstop- Clear queueloop- Toggle loop modelastfm- Configure scrobbling with last.fm
WebSocket API
Connect to the WebSocket server (configured via SOCKET_HOST, SOCKET_PORT, SOCKET_AUTH) to receive real-time updates and control the bot.
Authentication
Each WebSocket request requires the "auth" field to be set. You can check if the auth is correct by sending
{"type": "verify_auth", "auth": "YOUR_AUTH_KEY"}
This will send back valid auth or invalid auth.
The auth is defined by SOCKET_AUTH in the .env file.
State Updates
The server broadcasts state updates on queue changes:
{
"type": "state",
"value": {
"paused": false,
"song_queue": [Song, Song, Song], // these ones have the source field passed, stupid, i know
"metadata_queue": [Song, Song, Song], // these ones don't and are waiting for the source to be downloaded and processed
"current_song": Song,
"loop": false,
"time": 123.45 // how long the song has been playing for, in seconds
}
}
Song Object
{
"id": "uuid",
"artist": "Artist Name",
"title": "Song Title",
"duration": 180,
"url": "https://...",
"source": "relative path to mp3 on host, irrelevant"
}
Notes
- This project is under development
- Last.fm scrobbling requires users to be authenticated and for API keys to be configured in .env
- WebSocket server requires
SOCKET_HOST,SOCKET_PORT, andSOCKET_AUTHto be configured