mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
fix: refactored pause command, added common method getDisplayTrackDurationAndUrl()
This commit is contained in:
1 parent
ee8cc06e4d
commit
0850d9b26d
7 files changed
+64
-94
No files matched your search
@@ -62,16 +62,7 @@ class QueueCommand extends BaseSlashCommandInteraction {
|
||||
queueString = queue.tracks.data
|
||||
.slice(pageIndex * 10, pageIndex * 10 + 10)
|
||||
.map((track, index) => {
|
||||
let durationFormat =
|
||||
Number(track.raw.duration) === 0 || track.duration === '0:00' ? '' : `\`${track.duration}\``;
|
||||
|
||||
if (track.raw.live) {
|
||||
durationFormat = `${this.embedOptions.icons.liveTrack} \`LIVE\``;
|
||||
}
|
||||
|
||||
return `**${pageIndex * 10 + index + 1}.** **${durationFormat} [${track.title}](${
|
||||
track.raw.url ?? track.url
|
||||
})**`;
|
||||
return `**${pageIndex * 10 + index + 1}.** ${this.getDisplayTrackDurationAndUrl(track)}`;
|
||||
})
|
||||
.join('\n');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user