MM SPOTiFY v1000 for Live Streaming

This extension adds the flexibility and controllability of manipulating your Spotify player through commands and/or with the push of a button!

Listeners can submit song requests in chat via artist/song, or they can drop a Spotify link and accomplish the same thing. With this extension, each action is completely independent, meaning you can have your volume automatically adjust when you change scenes, pause the music when you switch to just chatting, or tie a channel point redeem to playing a specific song...the possibilities really are endless!

This extension DOES require a paid Spotify Premium account (couples, student, and family accounts work). Without the premium account, you will only be allowed to fetch your queue, and get the current/previously played songs.

How-To Set Up Spotify for Livestreaming Video Tutorial

YouTube Thumbnail
Download from Ko-fi

Obtaining your Spotify API Key

Go over to the Spotify Developer website and sign in, or create an account. Once you've signed in, follow the steps below.

Step 1:

Click your profile in the top right and then on the 'Dashboard' drop-down. View your Spotify Creator dashboard

Step 2:

Click on the 'Create App' button. Creating an App on Spotify Dashboard

Step 3:

The required fields are highlighted in red below. The 'App Name' can be whatever you want it to be, and 'App description' can be left blank. The 'Redirect URI' MUST match this http://127.0.0.1:1400/spotifyAuth/. Lastly, don't worry about checking any of the boxes, except for agreeing with the terms. Press 'Save' and move to the next step. Spotify App Required Fields

Step 4:

Press the 'Settings' button to be taken to the settings of your newly created app. Spotify App Settings Page

Step 5:

Press the 'Show client secret' button to expand the field and copy both the 'Client ID' and the 'Client Secret' to paste into Streamer.bot. Once both are copied, you may close out of your browser. (Don't use the Client ID / secret from this screenshot (I've already deleted them))Obtaining Spotify App Client ID and Secret

Setting up the Spotify for Livestreaming Extension

Import into Streamer.bot

Press the Import button on Streamer.bot and drag the previously downloaded file into the 'Import String' box. You will be importing 21 Actions, 2 Queues, and 19 Commands.

Press the Import button on the bottom of the 'Import Actions' pop out window, and then press the 'Ok' button acknowledging the commands are set to 'Disabled' by default.

Importing Spotify Extension into Streamer.bot

Manually add the References for C# into Streamer.bot

These next step only apply if you are using Streamer.bot 0.2.2 (or earlier). If you have version 0.2.3 or newer, skip down to 'Initializing'.

On the 'Spotify Auto Runner', 'Spotify Controls', and 'Spotify Initialization' Actions, you need to double-click on the 'Execute Code' Sub-Actions. When they pop open, select the 'References' tab and then Right-Click and select 'Add Reference from file...'.

Manually adding C# Reference in Streamer.bot

On the pop-out window, select your Streamer.bot folder and then add each of the following, one at a time:

  • System.Threading.Task.Extensions.dll
  • Newtonsoft.Json.dll
  • Microsoft.Bcl.AsyncInterfaces.dll

Finding locally installed .dll on Windows PC

After you add the new files, delete the original 3 that were in your folder, press Compile to ensure you get 'Compiled Successfully'! Once you get that message, you can press 'Save and Compile' and then head on over to your chat!

Initializing Spotify Extension for Live Streaming

Click on the 'Spotify Initialization' Action and past your 'Client ID' and 'Client Secret' that you copied earlier from your Spotify app to it's respective argument.

Utilizing Spotify Client ID and Secret

Navigate to your 'Commands' Tab, right-click on the group name, and 'Enable All'.

Enabling commands in Streamer.bot

Open up your chat window and run the initialization command: !spotifyInit.

You MUST have the Spotify App open and running on your computer PRIOR to initialization. If not, you'll have to run the command again!

Upon successful initialization, you will be greeted by this really AWESOME screen and a friendly chat message that has your current PC name listed for Spotify control.

Granting access to Streamer.bot for Spotify extension

Congratulations, you have just installed MM SPOTiFY v1000!

Spotify Live Streaming Extension Available Controls

All of the commands listed below are NOT case-sensitive and can be changed to your likings for your stream/community. For example, somebody that plays a lot of Marbles on Stream may not want to keep !play.

CommandControllable FeatureDescription
!playPlay/Resume PlaybackStandard 'Play' button for the Spotify App.
!pausePause PlaybackStandard 'Pause' button for the Spotify App.
!skipSkip the current songSkips the currently playing song.
!previousSkip back to previous songMoves playback to previously played song.
!volumeSet the volume of the playerAccepts command with numerical values, or argument input (i.e. !volume 70 or !volume -10).
!srSong RequestsAccepts either Artist and Song, or Spotify track links (no playlist, album, or artist).
!songDisplay the current songDisplays the current 'Song' by Artist in the chat (even with song names turned off).
!queueShow the current queueIf used without a number, it shows the next song. Also accepts values to show next 'X' songs (i.e. !queue 5).
!lastShow the last played songIf used without a number, shows the last song. Also accepts values to show previous 'X' songs (i.e. !last 3).
!requesterNameToggle requester namesShow requester name with song information. Toggles on/off or can be explicit. (i.e. !requestername on/off, yes/no, true/false)
!songNameToggle song namesShows 'Song' by Artist in chat on song change. Toggles on/off or can be explicit. (i.e. !songname on/off, yes/no, true/false)
!linkShows linkDisplays Spotify link for currently playing song.
!playlistLists or Selects PlaylistUsing just !playlist will show user-owned playlist, !playlist # will play that playlist (maintaining queued songs).
!addSongAdds to the playlistRequires selecting playlist first, then !addSong will add the currently playing track to the playlist.
!blockSongBlocks a song from future requests!blockSong will skip the current song and add it to the blocked list. !blockSong with song/artist and/or track link will add it to the blocked list.
!allowSongRemoves song from block list!allowSong will show list of all currently blocked songs. !allowSong # or Name from the list will remove it from the blocked list.
!mySongsShows user's requestsLists the number in the queue of any user requests.
!spotifyInitInitializes ControlsRun after Client ID and Client Secret have been entered.
!spotifyCommandsShows available commandsLists available commands in the chat

!play Command for Spotify Live Streaming

Command Aliases: None
Modifiers: None
Notes: It has ONE job... Play command for Spotify Live Streaming

!pause Command for Spotify Live Streaming

Command Aliases: None
Modifiers: None
Notes: Sometimes you just need to pause the music... Pause command for Spotify Live Streaming

!skip Command for Spotify Live Streaming

Command Aliases: !next
Modifiers: None
Notes: Who requested that song? Let's get rid of it... Skip Command for Spotify Live Streaming

!previous Command for Spotify Live Streaming

Command Aliases: !prev
Modifiers: None
Notes: Maybe that last song was a banger?! Previous Command for Spotify Live Streaming

!volume Command for Spotify Live Streaming

Command Aliases: !vol
Modifiers: 0-100
Notes: This command accepts an argument %volPercent% (disabled by default and name cannot be changed) for use in other Actions. IF the argument is enabled and you use !volume with no numbers, it'll set the volume at that value. Volume Command for Spotify Live Streaming

!sr (Song Request) Command for Spotify Live Streaming

Command Aliases: !request, !songRequest
Modifiers: None
Notes: This accepts either song titles, artist and song titles, or Spotify track links (will send a message in chat telling the requester it can't accept album, artist, or playlist links). Song Requests Command for Spotify Live Streaming

!song (Now Playing) Command for Spotify Live Streaming

Command Aliases: None
Modifiers: None
Notes: Even if song names are disabled via the !songNames command, you can manually view the currently playing 'Song' by Artist. It will include the requester name if that is enabled! Now Playing Song Command for Spotify Live Streaming

!queue Command for Spotify Live Streaming

Command Aliases: None
Modifiers: 1-50
Notes: If left blank, it will return the next one. When used with a number, it'll return that many songs (i.e. !queue 5 would return the next 5 songs). If the number of songs requested would exceed the 500 character limit for a Twitch message, it'll say that in chat instead. Upcoming songs queue Command for Spotify Live Streaming

!last Command for Spotify Live Streaming

Command Aliases: !lastSong, !lastSongs
Modifiers: 1-50
Notes: Just like the !queue command, if left blank, it will return the last played song. When used with a number, it'll return that many songs (i.e. !last 3 would return the previously played 3 songs). If the number of songs requested would exceed the 500 character limit for a Twitch message, it'll say that in chat instead. Previous songs Command for Spotify Live Streaming

!requesterName Command for Spotify Live Streaming

Command Aliases: !requesterNames
Modifiers: On/Off, Yes/No, Y/N, True/False
Notes: This can be used as a toggle (i.e. if you type !requesterName and they're currently on, it will turn them off). Conversely, you can explicitly use one of the modifiers !requesterNames on. Sone requester names Command for Spotify Live Streaming

!songName Command for Spotify Live Streaming

Command Aliases: !songNames
Modifiers: On/Off, Yes/No, Y/N, True/False
Notes: This only affects the ability to show the 'Song' by Artist every time a NEW song plays and operates independently of the !song command. This can be used as a toggle (i.e. if you type !songName and they're currently on, it will turn them off). Conversely, you can explicitly use one of the modifiers !songNames on. Enabling and disabling song names in chat for Spotify Live Streaming

Global Variables Available for Spotify Live Streaming Extension

The following global variables are available to be used for things like overlays, GDI text, and Now Playing widgets. Access them like this: ~currentSongName~ throughout Streamer.bot.

Variable NameDescription
currentAlbumImageURL of current Album Cover
currentAlbumNameName of Album from currently playing track
currentAlbumTracksNumber of tracks on Album associated with currently playing Track
currentArtistNameName of Artist for currently playing Track
currentDurationMsLength of currently playing Track (in milliseconds)
currentProgressMsProgress of currently playing Track (in milliseconds)
currentReleaseYearRelease year of Album (or Single) associated with currently playing Track
currentSongLinkSpotify link for currently playing Track
currentSongNameName of currently playing Track
currentSpotifyUriSpotify URI for currently playing Track
currentTrackNumberTrack number for Album associated with currently playing Track
© 2024 Mustached_Maniac. All rights reserved.