Nathan Smith
  • Projects
  • About
  • Contact

Playing Spotify playlists in Discord voice channels

July 9, 2020, 3:02 AMD&D

A guide on playing Spotify playlists in Discord voice channels. I figured all this out trying to set up some mood music for online D&D play.

What you'll need:

  1. Discord
  2. Spotify account
  3. YouTube account
  4. Beeftext (optional)

What you won't need:

  1. Money

Let's get started.

Convert your playlists

Navigate to Playlist Buddy and log in with Spotify and YouTube. Select your Spotify playlist on the left, select Convert Playlist on the right. Once it reaches 100%, click the link to open the playlist on YouTube.

At this point, the playlist will be private. Set it to Unlisted or Public.

Add a music bot to your server


The original version of this post recommended a bot called BMO. I was fairly new to discord bots, but have learned that this is one of many bots that do way too many things and all use the same infrastructure underneath. BMO will work, and I'll leave the instructions to use it below, however I'm now using a different bot, Chip, which only does music and doesn't require extensive setup. Your mileage may vary. If you do use BMO, the commands will be slightly different, but should be easy to match up. BMO does have the added bonus of shuffling playlists by default, but I still find Chip to be better overall.

Chip doesn't really require any setup, but use ch!help to see the supported commands. My only note is that the help text displays the commands with capital letters, but only lowercase letters seem to work.

Original post:

There are a number of bots that allow you to play music in voice channels for free, but the only one I found that also allows you to set a default volume level for free is BMO. BMO has almost no documentation, but the ./help command will get you most of the way there.

A note on BMO. BMO has lots of features. Some might even say too many features, including some you definitely won't want in your family friendly D&D discord server. Thankfully you can turn them all off, it just takes a while.

Every section in the ./help menu is a "cog" that can be disabled, including the few NSFW cogs. To disable a cog, send the ./set disabled <cog> command. For example, ./set disabled ImageManipulation disables all image manipulation commands. Note that this is case sensitive. There's a 15 second cooldown between each call, so it can take some time to disable them all. I disabled everything except Core (because you cannot) and Music (because that's what I'm using the bot for); I recommend doing this in a private channel so you don't spam your servermates.

Test it out and adjust volume

Word of warning: this might be loud. Join an empty voice channel and type ch!play <playlist-url> where playlist-url is the full url of your unlisted or public youtube playlist. Rather than adjusting your computer's volume, use the ch!defaultvolume command to set the level. Since I'm using this for background music, I set the volume to 10%: ch!defaultvolume 10. You may have to ch!stop and restart for the volume change to take effect.

Once everything is set, enable shuffle mode with ch!shuffle. You'll have to do this every time you use the play command, and it will not skip the first track; the ch!skip command will do that if you want to. Then, stop the music with ch!stop.

Switching between playlists

At this point, we could stop, but I have multiple playlists for multiple moods: optimistic exploration, dark exploration, dungeon, battle, and tavern. Rather than keeping the tab for each playlist open, I'm using Beeftext, which is a handy macro tool that replaces a given combination of keystrokes like xxdungeon with a given snippet of text, like

After adding all my playlists as commands in Beeftext, I can now use commands like ch!play xxtavern to play my tavern playlist. To switch to the battle playlist, I use ch!stop and ch!play xxbattle. Multiple ch!play commands in a row add to the queue, so make sure to stop the music first, or clear the queue with ch!clear.

Wrapping up

That's pretty much it. I'm sure there are other ways to do this, and Discord natively supports Spotify follow-along for everyone that has Spotify premium so this may not be necessary for you. Some songs might not be readily available on YouTube. Still, this was free and not difficult to set up, so it works for me. As a bonus, here are my 5 D&D playlists:

  1. Exploration - Optimistic
  2. Exploration - Dark
  3. Tavern
  4. Battle
  5. Dungeon

Previous: usePrismjs: A prismjs hook for CRA & React

Next: Using and D&D Beyond to Manage a Tabletop Campaign