diff --git a/music/player/src/main/kotlin/dev/schlaubi/mikmusic/util/TrackUtil.kt b/music/player/src/main/kotlin/dev/schlaubi/mikmusic/util/TrackUtil.kt index 6add882bd..5b6e5ed63 100644 --- a/music/player/src/main/kotlin/dev/schlaubi/mikmusic/util/TrackUtil.kt +++ b/music/player/src/main/kotlin/dev/schlaubi/mikmusic/util/TrackUtil.kt @@ -1,6 +1,8 @@ package dev.schlaubi.mikmusic.util import dev.arbjerg.lavalink.protocol.v4.Track +import kotlin.time.DurationUnit +import kotlin.time.toDuration /** * Formats a simple message for a [Track]. @@ -8,7 +10,7 @@ import dev.arbjerg.lavalink.protocol.v4.Track * @param repeat whether to add the repeat emoji or not */ fun Track.format(repeat: Boolean = false) = with(info) { - "$title - $author ($length)".run { + "[`$title - $author`]($uri) (${length.toDuration(DurationUnit.MILLISECONDS)})".run { if (repeat) { "🔂 $this" } else { diff --git a/music/player/src/main/kotlin/dev/schlaubi/mikmusic/util/VideoFormatter.kt b/music/player/src/main/kotlin/dev/schlaubi/mikmusic/util/VideoFormatter.kt index ef8ca6ad4..7e5e14ffa 100644 --- a/music/player/src/main/kotlin/dev/schlaubi/mikmusic/util/VideoFormatter.kt +++ b/music/player/src/main/kotlin/dev/schlaubi/mikmusic/util/VideoFormatter.kt @@ -29,7 +29,7 @@ suspend fun EmbedBuilder.addSong(commandContext: CommandContext, track: Track) = suspend fun EmbedBuilder.addSong(translate: Translator, track: Track) { field { name = translate("music.track.title", "music") - value = track.info.title + value = "[${track.info.title}](${track.info.uri})" } field {