• 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.

Remove queue into playlist?

Status
Not open for further replies.

0ddlyoko

Member
Hello world! I'm here for a last question, it's just that how do we remove music from the queue?
I have this code:

var queue = sinusbot.queueGet();
var nb = queue.length;


if (nb >= config.max_queue) {
send_msg(ev, 'You cannot add more that ' + nb + ' song in the queue !');
return;
}

if (nb > 0) {
var unique = queue.filter(function(elem, index, self) {
return index == self.indexOf(elem);
};
}


unique is the new playlist (i think).
I would put index as the new playlist.
 
Last edited:
Status
Not open for further replies.
Top