Skip to content

Adding a song to your playlist

chris larosa edited this page May 16, 2013 · 4 revisions

In order to add a song to the end of the bot's playlist, you can do the following:

// First get the list of the songs
bot.playlistAll(function(playlist) {
  // Use the length so that it gets added to the end of the list.
  bot.playlistAdd(currentsong.id, playlist.list.length); 
});
bot.snag(); // This adds the heart you see on the interface

leaving the above method up... but i have been informed that turntable does not like the above method because its resource intensive for them to pull the metadata up from the database.

this method also works for adding a song to the end of your playlist... -1 is the same as adding to the end.

//add to the end
bot.playlistAdd(currentsong.id, -1); 
bot.snag(); //gives the heart animation... is not reliant on whether or not the song is already in your play list
Clone this wiki locally