Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
fix: trying to read title on track for initialized but empty queue
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusbegby committed Jul 9, 2023
1 parent 8c7d4a0 commit 77c91a3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions commands/skip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 77c91a3

Please # to comment.