Skip to main content

!play โ–ถ

The main entry point for playing music.

Music Voice Channel Required

Aliasesโ€‹

!p !voice !request !join !add

Permissionsโ€‹

none - Everyone can use this command.

Overviewโ€‹

!play acts as the main entry point for playing music through Okonau.
Using !play by itself will join the voice channel you're in (if it's not already in one), and give you a list of voice commands you can use.
If you use !play <something to play> while providing some kind of link or search query to music, Okonau will join the voice channel you're in (if it's not already in one), and start playing the requested music.

Okonau can play music from YouTube, SoundCloud, Spotify, and if you have a direct URL to a music file, that too.

  • For YouTube, you can request video urls and playlist urls, or if you don't have the url and just want to search for something, just give !play a search query instead.
  • For SoundCloud, you can request track urls and playlist/set urls.
  • For Spotify, you can request individual tracks, albums, artist pages and public playlists.

If there is music already playing in your server, requesting something else to play will queue up your track until the current track has finished. There's a limit of 500 queued tracks at a time.

If a track is currently paused, using !play will resume the track.

Usageโ€‹

YouTubeโ€‹

Search YouTube: !play <search query>
Example: !p the boat i row tame impala
(Searches YouTube for "The Boat I Row" by Tame Impala, then plays it)

Play Video URL: !play <video url>
Example: !p https://youtu.be/poa_QBvtIBA
(Plays "funky town low quality" on YouTube)
Supports long and shortened YouTube urls

Play Playlist URL: !play <playlist url>
Example: !p https://youtube.com/playlist?list=PLSOR9_iNzVflhOZwcM_mrHE0JX4gfmHUT
(Queues up and plays all videos from the playlist "Japanese 80's Disco & City Pop")

note

We support playing livestreams from YouTube as well, just request them like you would a normal track.

SoundCloudโ€‹

Play Track URL: !play <track url>
Example: !p https://soundcloud.com/porter-robinson/fresh-static-snow-last-island
(Plays "Fresh Static Snow (Last Island Remix)" by Porter Robinson and Last Island on SoundCloud)

Play Playlist/Set URL: !play <playlist/set url>
Example: !p https://soundcloud.com/datdoomguy/sets/doom-eternal-official-flac
(Queues up and plays all tracks from the playlist "Doom Eternal Soundtracks" on SoundCloud)

Spotifyโ€‹

Play Track URL: !play <track url>
Example: !p https://open.spotify.com/track/3077zJdkrjvys57YcRuCgx
(Plays: "Oil" by Gorillaz and Stevie Nicks)

Play Album URL: !play <album url>
Example: !p https://open.spotify.com/album/6EB14IXV5oyOiItGBv7mtG
(Plays: "Hurry up, We're Dreaming" by M83)

Play Playlist URL: !play <playlist url>
Example: !p https://open.spotify.com/playlist/7LbezrthyZnAib6SbbPL7V
(Queues up and plays all tracks from the playlist "Japanese City Pop" on Spotify.)

Play Artist URL: !play <artist url>
Example: !p https://open.spotify.com/artist/4V8LLVI7PbaPR0K2TGSxFF
(Queues up and plays the top 10 most popular tracks from "Tyler, The Creator".)

Paused musicโ€‹

Resume paused music: !play
Example: !p
(If music is paused, this will resume the music.)

caution
  • There's a Spotify defined limit of requesting playlists with more than 100 tracks in. If your playlist exceeds 100 tracks, we won't be able to request any more tracks beyond the first 100.
  • Your playlist needs to be public so that Okonau can see it. If you're having trouble trying to play music from a certain playlist, try copying all the tracks in the playlist ([CTRL + A] -> drag to a new playlist), then requesting the new playlist once it's public ([Right Click] -> "Make Public").

Developer Notesโ€‹

secret developer commentary inside!
  • When you request a track from Spotify, we're not grabbing the audio from Spotify (we can't). Instead we use the metadata that the Spotify track provides us (track name, artist, album and track length) in order to do a super accurate YouTube search for the YouTube alternative.
  • The logic that goes into searching YouTube for the track you want is quite complex. We grab a handful of the first results we get, ping each of them for more information, remove several channels that give similar sounding but inaccurate results, try to filter out live recordings of the track, try to filter out remixes and try to remove versions of the track that are just repeated for an hour or ten. After all of that, we start looking for the best candidates of the ones remaining, such as videos that have been uploaded by official audio artist channels and videos that have been marked as "official" in the title. In rare cases, there are no remaining candidates from the initial selection - in that case we fall back on the original first result that YouTube sent back.
  • I just mentioned that we filter out remixes and live recordings above, but if that's what you're looking for you can search for them again by adding 'remix' and 'live' into your search query. Of course all of this only applies if you're using !play with a search query, if you know which track you want and you have the URL, you can use !play <url>.
  • In the case you've added multiple tracks to the queue, Okonau will try to preload the next track so it's ready to play as soon as the current one ends, so you're not waiting. This makes listening to albums that have seemless track transitions quite nice!