• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

EN How to use PlaylistTrack.play() ?

Dexter127

Member
Hello I'm making a my own script for sinusbot and all music I want to use is a downloaded playlist from youtube. Now I don't know how use PlaylistTrack.play() - I think I did it proprely but this isn't working.

here's example of my code:

JavaScript:
 function(sinusbot, config) {
    var engine = require('engine');
    var media = require('media');
var p = media.getPlaylists();
var ptracks = p[0].getTracks();
ptracks[24].play(); // for example 24 id from the playlist (I have at least 90 songs in this playlist!)
Same situation with Playlist.setActive(); - this should play whole playlist but it isn't, why? What am I doing wrong??
I think it should work but it isn't. Can you help me with it? I can't find answer anywhere.
 
Last edited:

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
Any errors in the instance log?
 
Top