music: forgot [0] on splice

This commit is contained in:
Cynthia Foxwell 2022-04-18 23:11:52 -06:00
parent f212046bfb
commit 13b6420ff6

View file

@ -118,13 +118,7 @@ async function createVoiceConnection(guild_id, voice_id, text_id) {
connection._music_eventEnd = async function () {
if (connection._music_queue.length > 0) {
const next = connection._music_queue.splice(0, 1);
hf.bot.guilds
.get(guild_id)
.channels.get(text_id)
.createMessage(
`DEBUG: \`\`\`\nnext = ${next}\nnext.url = ${next.url}\nnext.type = ${next.type}\nnext.addedBy = ${next.addedBy}\n\nqueue length: ${connection._music_queue.length}\n\`\`\``
);
const next = connection._music_queue.splice(0, 1)[0];
await enqueue(
guild_id,
voice_id,