> For the complete documentation index, see [llms.txt](https://docs.moodymusic.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.moodymusic.xyz/features/music-system.md).

# Music System

Moody Music uses **Lavalink v4** as its audio streaming backbone, delivering low-latency, high-fidelity playback.

## Audio Sources

The bot supports playback from these platforms:

| Platform      | Support                                     |
| ------------- | ------------------------------------------- |
| YouTube       | Search by name or URL                       |
| YouTube Music | Search and direct links                     |
| Spotify       | Track, album, and playlist URLs             |
| SoundCloud    | Search and direct links                     |
| JioSaavn      | Search via the `/api/music/search` endpoint |

## 24/7 Mode

Premium servers can enable 24/7 mode with `m247`. When active:

* The bot stays in the voice channel even when all members leave
* Playback continues uninterrupted
* Music resumes for anyone who joins later
* 24/7 mode is automatically disabled when server premium expires

## Quality

Audio is streamed at the highest quality available from the source. Lavalink nodes are configured for:

* **Opus** encoding for Discord transmission
* Configurable volume range (0–200%)
* Smooth transitions between tracks

## Player Controls

| Command              | Description                 |
| -------------------- | --------------------------- |
| `mplay`              | Play a song or add to queue |
| `mskip`              | Skip current track          |
| `mstop`              | Clear queue and stop        |
| `mpause` / `mresume` | Toggle playback             |
| `mseek <seconds>`    | Seek to a position          |
| `mvolume <0-200>`    | Adjust volume               |
| `mloop`              | Toggle loop modes           |
| `mshuffle`           | Shuffle the queue           |
