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