# Music

Source: https://righteousbot.dev/docs/features/music/

Play and queue music in a voice channel, and see who is allowed to control it.

Music needs a voice channel and the bot online. Playback commands are top-level (`,play`, `,skip`, `,queue`); server settings live under [`,music`](/commands/music/music/#music). Slash mirrors them as `/music`. Sessions live in memory, so a bot restart clears every queue.

## Start playing [#start-playing]

[`,play`](/commands/music/play/#play) (alias `pl`) takes a YouTube, Spotify or SoundCloud link, a direct audio URL, or a search. The first `,play` creates the session and locks the bot to your voice channel. [`,join`](/commands/music/join/#join) connects it without queuing anything.

<CommandBlock syntax=",play <song name or link>" example=",play never gonna give you up" />

<Callout type="error" title="Stage channels aren't supported">
  Connect from a regular voice channel.
</Callout>

## Control playback [#control-playback]

| Command                                                                                                              | Does                                                  | Who                                  |
| -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------ |
| [`,pause`](/commands/music/pause/#pause) / [`,resume`](/commands/music/resume/#resume)                               | Pause and unpause                                     | In the voice channel                 |
| [`,skip`](/commands/music/skip/#skip)                                                                                | Skips the track                                       | DJ, the track's requester, or a vote |
| [`,stop`](/commands/music/stop/#stop)                                                                                | Stops, clears the queue, disconnects                  | DJ                                   |
| [`,previous`](/commands/music/previous/#previous)                                                                    | Replays the last track. `previous list` shows history | DJ                                   |
| [`,seek`](/commands/music/seek/#seek) `<position>`                                                                   | Jumps to a timestamp                                  | DJ                                   |
| [`,fastforward`](/commands/music/fastforward/#fastforward) / [`,rewind`](/commands/music/rewind/#rewind) `[seconds]` | Nudge 15 seconds by default                           | DJ                                   |
| [`,volume`](/commands/music/volume/#volume) `[0-150]`                                                                | Anyone can read it                                    | DJ to set                            |
| [`,shuffle`](/commands/music/shuffle/#shuffle)                                                                       | Shuffles the queue                                    | DJ                                   |
| [`,repeat`](/commands/music/repeat/#repeat) `[off/track/queue]`                                                      | Anyone can read it                                    | DJ to change                         |
| [`,nowplaying`](/commands/music/nowplaying/#nowplaying)                                                              | Current track, progress bar and controls              | Anyone                               |
| [`,grab`](/commands/music/grab/#grab)                                                                                | DMs you the current track                             | Anyone                               |

<CommandBlock syntax=",seek <position>" example=",seek 1:30" />

## Manage the queue [#manage-the-queue]

[`,queue`](/commands/music/queue/#queue) shows what's lined up. Removing a track works for a DJ or whoever requested it. Moving, shuffling and emptying are DJ only.

<CommandBlock syntax=",queue [add <song> | remove <pos> | move <from> <to> | shuffle | empty]" example=",queue remove 3" />

<Callout type="warn" title="Queue caps: 25 free, 50 with Server Premium">
  Nothing warns you until you hit it: `,play` on a full queue is refused. The cap is per server.
</Callout>

## Who counts as DJ [#who-counts-as-dj]

Anyone passing **in the session's voice channel** can change playback; `,queue` and `,nowplaying` work from anywhere. You're a DJ if you are the guild owner, hold the DJ role, or have **Manage Server** (fake permissions count). Everyone else can skip only by vote, and only when the server turns it on.

## Set up the DJ role and vote-skip [#set-up-the-dj-role-and-vote-skip]

[`,music`](/commands/music/music/#music) is gated like any server setting, not by DJ.

| Subcommand                           | Does                                                                                         |
| ------------------------------------ | -------------------------------------------------------------------------------------------- |
| `,music djrole <@role/off>`          | Sets who counts as DJ besides Manage Server                                                  |
| `,music voteskip <on/off> [percent]` | Vote-skip, **off by default**; needs 50% of the humans in the channel unless you set another |
| `,music announce <on/off>`           | Posts a now-playing embed for each track                                                     |
| `,music settings`                    | Shows the current setup                                                                      |

<CommandBlock syntax=",music voteskip <on/off> [percent]" example=",music voteskip on 60" />

A vote is dropped if the voter leaves the channel before the threshold is reached.

## Keep the bot in the channel [#keep-the-bot-in-the-channel]

[`,music 247`](/commands/music/music/#music-247) (alias `stay`) skips the idle disconnect. **Turning it on needs Server Premium. Turning it off is never gated**, so a lapsed server can always release the channel.

<CommandBlock syntax=",music 247 <on/off>" example=",music 247 on" />

## Apply an audio mode [#apply-an-audio-mode]

[`,mode`](/commands/music/mode/#mode) (`/music mode` on slash) applies `nightcore`, `karaoke`, `slowed`, `bassboost` or `8d`. Setting one needs **premium or Server Premium, and DJ**. `,mode off` needs DJ but is never premium-gated.

<CommandBlock syntax=",mode [nightcore/karaoke/slowed/bassboost/8d/off]" example=",mode nightcore" />

## When the bot leaves [#when-the-bot-leaves]

A session belongs to one voice channel. Starting one from another channel is refused until the locked channel empties.

| Event                   | Result                                                  |
| ----------------------- | ------------------------------------------------------- |
| Locked channel empties  | Playback pauses, 60-second grace timer                  |
| Someone rejoins in time | Resumes                                                 |
| Nobody returns          | Session destroyed, queue cleared, notice posted         |
| Queue ends              | Disconnects after **5 minutes** (never when 24/7 is on) |

## Common issues [#common-issues]

**`,play` says a session is already active.** The locked channel still has someone in it. Wait for it to empty, or have them run `,stop`.

**Vote-skip does nothing.** It's off until you run `,music voteskip on`, and it only applies to members who can't already skip.

**`,mode` or `,music 247 on` shows a premium message.** Modes need premium or Server Premium. 24/7 needs Server Premium.

**The queue vanished.** A bot restart clears every queue. Queue again.

More fixes are on the shared [common issues](/docs/common-issues/) page.
