music: please work for queue removal...

This commit is contained in:
Cynthia Foxwell 2022-04-24 13:16:01 -06:00
parent bf5a6df175
commit 5cc4a03b08

View file

@ -700,11 +700,9 @@ command.callback = async function (msg, line) {
); );
if (Array.isArray(toRemove)) { if (Array.isArray(toRemove)) {
for (const removedItem of toRemove) {
connection._music_queue = connection._music_queue.filter( connection._music_queue = connection._music_queue.filter(
(item) => item.id !== removedItem (item) => !toRemove.includes(item.id)
); );
}
return `Removed ${toRemove.length} item(s).`; return `Removed ${toRemove.length} item(s).`;
} else { } else {
return toRemove; return toRemove;