fix: trying to read title on track for initialized but empty queue

This commit is contained in:
Marius Begby committed 2023-07-10 00:29:01 +02:00
1 parent 8c7d4a07ca
commit 77c91a350f
1 file changed
+12
+12
View File
@@ -75,6 +75,18 @@ module.exports = {
});
}
} else {
if (queue.tracks.data.length === 0 && !queue.currentTrack) {
return await interaction.editReply({
embeds: [
new EmbedBuilder()
.setDescription(
`**Failed**\nThere are no tracks in the queue and nothing currently playing.`
)
.setColor(embedColors.colorWarning)
]
});
}
const skippedTrack = queue.currentTrack;
queue.node.skip();