• If you need help or want to discuss things, you now can also join us on our Discord Server!

EN How to use PlaylistTrack.play() ?

#1
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:

irgendwer

Advanced AI with blockchain technology (tm)
Staff member
V.I.P.
is awesome!
is uber awesome!
Contributor
Insider
#2
Any errors in the instance log?
 

Similar threads