Skip to content

You type these helpers into a reply, such as a command reply, an event response or a timer message. The bot fills them in from your channel’s music when it sends the line. Reading a value changes nothing.

{music.now} is the current track, and the queue helpers describe the song requests that wait after it. So Now playing: {music.now} gives Now playing: Song A by Artist A, and Up next: {music.queue.next} gives Up next: Song B by Artist B.

The music.now.* helpers, {music.volume}, {music.shuffle} and {music.repeat} read the connected music player. The music.requests.* helpers read your saved request settings, and the history helpers read the requests the bot has stored, so both answer without a player. No music helper works in text that viewers write. There it prints as written, even when the Viewer Templates setting is on.

When there is nothing to show

A helper that has nothing to read prints as written, braces and all. When the player has no track, Now playing: {music.now} goes out exactly like that. So test the reply once with the music stopped. {music.now.isPlaying} always answers, with false when no track plays. {music.now.status} always gives one of its five states.

An empty queue is a real answer, not a missing one. {music.queue.length} and {music.queue.requesters} give 0, and {music.queue.isEmpty} gives true. The helpers that name or time songs in the queue, such as {music.queue.next}, {music.queue.list:3} and {music.queue.duration}, print as written when the queue is empty.

A track missing one detail behaves the same. A track with no album leaves {music.now.album} as written, and a track nobody requested leaves {music.now.requester} as written. When only the artist is missing, {music.now} gives the title alone.

How far back the history reads

The history helpers read the newest 500 requests of your channel that have started playing. A request counts only once it starts playing, and its time is the moment it started. So a song that still waits in the queue is not in {music.history.last}, {music.user.lastRequest} or the stream counts.

The helpers ending in .stream keep only the songs in that set that started since the stream went live. They print as written while you are offline. {music.user.requests.total} reads the viewer’s all-time count from their viewer profile instead, so the 500 limit does not apply to it.

Values a pipeline step fills in

A pipeline still needs a trigger that supplies the person, message or event a helper reads. Six helpers only work in a pipeline, and each group works in a different place. The four music.favorite.* values work in the steps that come after the favorite step. The two playlist values work only in the messages of the Add to playlist step itself.

The Song request favorite step (song_request_favorite) queues a viewer’s most-requested song and fills in the four music.favorite.* values. It tries up to 10 of the viewer’s tracks, most-requested first, and {music.favorite.outcome} says how that went:

  • queued: a favorite went into the queue, and the other three values describe it.
  • unavailable: the music service could not take the track. The values still name the track it tried.
  • none: the viewer has no request history, or each favorite was refused, for example because it was blocked or already in the queue. With no history at all, the track and artist are empty and the count is 0.

The Add to playlist step fills in {playlist_id} and {track_name} for its own two messages. One message goes out after the track is added, and the other when the track is already in the playlist. A later step does not get these two values. When the step adds the current track, {track_name} is that track’s name. When the step adds a fixed track, {track_name} is that track’s address, not a name.

Now playing

HelperWhat it givesExampleUse in
{music.now}The current track, with its artistSong A by Artist ACommands, event responses, timers, pipelines, Discord, webhooks
{music.now.album}The album of the current trackAlbum ACommands, event responses, timers, pipelines, Discord, webhooks
{music.now.artist}The artist of the current trackArtist ACommands, event responses, timers, pipelines, Discord, webhooks
{music.now.bar}A progress bar of the current track, with the clock{music.now.bar:5} gives ▬▬🔘▬▬Commands, event responses, timers, pipelines, Discord, webhooks
{music.now.cover}The cover image address of the current trackhttps://i.scdn.co/image/sampleCommands, event responses, timers, pipelines, Discord, webhooks
{music.now.duration}The length of the current track3:30Commands, event responses, timers, pipelines, Discord, webhooks
{music.now.isPlaying}Whether music is playing, as true or false, for if and switchtrueCommands, event responses, timers, pipelines, Discord, webhooks
{music.now.link}A link that opens the current trackhttps://open.spotify.com/track/sampleCommands, event responses, timers, pipelines, Discord, webhooks
{music.now.percent}How far the current track has come, in percent40%Commands, event responses, timers, pipelines, Discord, webhooks
{music.now.progress}How far the current track has come1:23Commands, event responses, timers, pipelines, Discord, webhooks
{music.now.remaining}How much of the current track is left2:07Commands, event responses, timers, pipelines, Discord, webhooks
{music.now.requester}The viewer who requested the current trackViewerTwoCommands, event responses, timers, pipelines, Discord, webhooks
{music.now.requester.mention}The viewer who requested the current track, as a mention@ViewerTwoCommands, event responses, timers, pipelines, Discord, webhooks
{music.now.status}The state of the player: playing, paused, starting, blocked or idleplayingCommands, event responses, timers, pipelines, Discord, webhooks
{music.now.title}The title of the current trackSong ACommands, event responses, timers, pipelines, Discord, webhooks
{music.provider}The name of the music service the channel uses, such as Spotify or YouTubeSpotifyCommands, event responses, timers, pipelines, Discord, webhooks
{playlist_id}The id of the playlist the Add to playlist step added the track to, in that step’s own messages37i9dQZF1DXpipelines
{track_name}The track the Add to playlist step added, in that step’s own messages: its name, or its address when the step adds a fixed trackBlinding Lightspipelines

For {music.now.bar}, add a width from 1 to 50 after a colon to get only the bar, that many marks long, with no clock. Without a width the bar is 11 marks.

The queue

Some helpers look only at the first 10 songs in the queue: {music.queue.position}, {music.queue.position.ordinal}, {music.queue.wait}, {music.queue.wait.at}, the four music.queue.mine.* helpers and {music.queue.target.count}. For a viewer whose song is at place 11 or later, they print as written, and the counts give a number that is too low. {music.queue.item} and {music.queue.list} read the whole queue, so this limit does not apply to them.

HelperWhat it givesExampleUse in
{music.queue.cost.total}The points spent on the songs that wait in the queue. A song request costs no points, so this gives 00Commands, event responses, timers, pipelines, Discord, webhooks
{music.queue.duration}The total length of the request queue17m 20sCommands, event responses, timers, pipelines, Discord, webhooks
{music.queue.isEmpty}Whether the request queue is empty, as true or false, for if and switchfalseCommands, event responses, timers, pipelines, Discord, webhooks
{music.queue.item}The song at a place in the queue, with its artist; the place is the input{music.queue.item:2} gives Song C by Artist CCommands, event responses, timers, pipelines, Discord, webhooks
{music.queue.length}How many songs wait in the request queue5Commands, event responses, timers, pipelines, Discord, webhooks
{music.queue.list}The titles of the first songs of the queue as a numbered list; the number of songs, up to 20, is the input{music.queue.list:3} gives 1. Song B, 2. Song C, 3. Song DCommands, event responses, timers, pipelines, Discord, webhooks
{music.queue.mine.code}The short code of the next song of the viewer, which they can type after !wrongsong, as in !wrongsong K7QMK7QMCommands, event responses, pipelines, webhooks
{music.queue.mine.count}How many songs of the viewer wait in the queue2Commands, event responses, pipelines, webhooks
{music.queue.mine.next}The title of the next song of the viewer in the queueSong CCommands, event responses, pipelines, webhooks
{music.queue.mine.titles}The titles of the songs of the viewer in the queueSong C, Song ECommands, event responses, pipelines, webhooks
{music.queue.next}The next song in the request queue, with its artistSong B by Artist BCommands, event responses, timers, pipelines, Discord, webhooks
{music.queue.next.requester}The viewer who requested the next songViewerThreeCommands, event responses, timers, pipelines, Discord, webhooks
{music.queue.position}Where the viewer’s next song sits in the queue3Commands, event responses, pipelines, webhooks
{music.queue.position.ordinal}Where the viewer’s next song sits in the queue, as an ordinal3rdCommands, event responses, pipelines, webhooks
{music.queue.requesters}How many different viewers have a song in the queue4Commands, event responses, timers, pipelines, Discord, webhooks
{music.queue.target.count}How many songs of the mentioned viewer wait in the queue. The mentioned viewer is the first word after the command, as in !queue @someviewer; read Target helpers for how the bot reads that name1Commands, event responses, pipelines, webhooks
{music.queue.wait}How long until the viewer’s next song starts7m 40sCommands, event responses, pipelines, webhooks
{music.queue.wait.at}At what time the viewer’s next song starts, in the channel time zoneabout 15:38Commands, event responses, pipelines, webhooks

History and favorites

HelperWhat it givesExampleUse in
{music.favorite.artist}The artist of the viewer’s most-requested trackThe Weekndpipelines
{music.favorite.count}How many times the viewer has requested that track12pipelines
{music.favorite.outcome}What happened: queued, none, or unavailable, as explained abovequeuedpipelines
{music.favorite.track}The name of the viewer’s most-requested trackBlinding Lightspipelines
{music.history.count.stream}How many requested songs have started playing since the stream went live21Commands, event responses, timers, pipelines, Discord, webhooks
{music.history.last}The last requested song that started playing, with its artistSong Z by Artist ZCommands, event responses, timers, pipelines, Discord, webhooks
{music.history.list}The titles of the last requested songs that started playing, newest first; the number of songs, up to 20, is the input{music.history.list:3} gives Song Z, Song Y, Song XCommands, event responses, timers, pipelines, Discord, webhooks
{music.history.topArtist.stream}The artist with the most requests played this streamArtist ACommands, event responses, timers, pipelines, Discord, webhooks
{music.history.topRequester.stream}The viewer with the most requests played this stream, with the countViewerTwo (4)Commands, event responses, timers, pipelines, Discord, webhooks
{music.user.lastRequest}The title of the viewer’s last request that started playingSong CCommands, event responses, pipelines, webhooks
{music.user.requests.stream}How many of the viewer’s requests have played this stream2Commands, event responses, pipelines, webhooks
{music.user.requests.total}How many songs the viewer has requested in this channel, all time9Commands, event responses, pipelines, webhooks

Player and request settings

HelperWhat it givesExampleUse in
{music.repeat}The repeat mode: off, track (one track) or context (the whole playlist or album)offCommands, event responses, timers, pipelines, Discord, webhooks
{music.requests.maxDuration}The longest song a viewer may request6:00Commands, event responses, timers, pipelines, Discord, webhooks
{music.requests.maxPerUser}The general limit of songs one viewer may have in the queue. A role with its own cap is not shown here3Commands, event responses, timers, pipelines, Discord, webhooks
{music.requests.open}Whether song requests are open, as true or false, for if and switchtrueCommands, event responses, timers, pipelines, Discord, webhooks
{music.shuffle}Whether shuffle is on or offoffCommands, event responses, timers, pipelines, Discord, webhooks
{music.volume}The music volume in percent60%Commands, event responses, timers, pipelines, Discord, webhooks

{music.volume}, {music.shuffle} and {music.repeat} print as written when the player has no track. The music.requests.* helpers still answer then, because they read your saved settings.

Back to Template helpers. For the places helpers work, special characters and HTML, read Variables and templates.