diff --git a/src/modules/music.js b/src/modules/music.js index 3cbc781..14f278e 100644 --- a/src/modules/music.js +++ b/src/modules/music.js @@ -265,6 +265,7 @@ async function enqueue( length, addedBy, stream, + id: Math.random().toString(16).substring(2), }); if (suppress === false) { textChannel.createMessage({ @@ -687,7 +688,7 @@ command.callback = async function (msg, line) { queue.slice(0, 25).map((item) => { const user = hf.bot.users.get(item.addedBy); return { - key: item.url.substring(0, 100), + key: item.id, display: (item.title ?? item.url).substr(0, 100), description: hasManageMessages && @@ -701,7 +702,7 @@ command.callback = async function (msg, line) { if (Array.isArray(toRemove)) { for (const removedItem of toRemove) { connection._music_queue = connection._music_queue.filter( - (item) => !item.url.startsWith(removedItem) + (item) => item.id !== removedItem ); } return `Removed ${toRemove.length} item(s).`;