diff --git a/commands/queue.js b/commands/queue.js index 38e56ed..6554193 100644 --- a/commands/queue.js +++ b/commands/queue.js @@ -68,9 +68,14 @@ module.exports = { queueString = queue.tracks.data .slice(page * 10, page * 10 + 10) .map((track, index) => { - return `**${page * 10 + index + 1}.** \`[${ - track.duration - }]\` [${track.title}](${track.url})`; + let durationFormat = + track.raw.duration === 0 || track.duration === '0:00' + ? '' + : `\`[${track.duration}]\``; + + return `**${page * 10 + index + 1}.** ${durationFormat} [${ + track.title + }](${track.url})`; }) .join('\n'); } @@ -98,6 +103,13 @@ module.exports = { length: 13 }); + if ( + currentTrack.raw.duration === 0 || + currentTrack.duration === '0:00' + ) { + bar = 'No duration available.'; + } + return await interaction.editReply({ embeds: [ new EmbedBuilder()