Skip to content

Commit

Permalink
Fix names of music plugin again
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Jul 19, 2023
1 parent ac1a0a2 commit 27164c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
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].
*
* @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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 27164c0

Please sign in to comment.