fix: nowplaying command now shows the current position of the track

Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
limited_dev 2023-05-11 09:09:58 +02:00
parent 27aee06681
commit 7237095636
3 changed files with 6 additions and 6 deletions

View file

@ -21,7 +21,7 @@ A Discord music bot, written in Kotlin using the kord library.
## Known issues ## Known issues
- The nowplaying command always shows the current position of the track at 0s - None (currently). Report issues to issues@moonleay.net or moonleay#7441
## Commands & Features ## Commands & Features

View file

@ -69,9 +69,9 @@ class NowPlayingExtension : Extension() {
MessageUtil.getEmbedWithImage( MessageUtil.getEmbedWithImage(
Color(0x52E01A), Color(0x52E01A),
"Currently playing", "Currently playing",
"**${track.title}**\n*Now Playing*\nby ${track.author} :${ "**${track.title}**\n*Now Playing*\nby ${track.author} ; ${
TimeUtil.getTimeFormatedRaw( TimeUtil.getTimeFormatedRaw(
track.position.inWholeMilliseconds player.position
) )
}: ${ }: ${
TimeUtil.getTimeFormatedRaw( TimeUtil.getTimeFormatedRaw(

View file

@ -76,7 +76,7 @@ object MusicManager {
MessageUtil.getEmbedWithImage( MessageUtil.getEmbedWithImage(
Color(0x52E01A), Color(0x52E01A),
"Queuing track from link", "Queuing track from link",
"**${item.track.info.title}**\n*Queue*\nby ${item.track.info.author} :: ${ "**${item.track.info.title}**\n*Queue*\nby ${item.track.info.author} ;: ${
TimeUtil.getTimeFormatedRaw( TimeUtil.getTimeFormatedRaw(
item.track.info.length item.track.info.length
) )
@ -108,7 +108,7 @@ object MusicManager {
MessageUtil.getEmbedWithImage( MessageUtil.getEmbedWithImage(
Color(0x52E01A), Color(0x52E01A),
"Queuing playlist from link", "Queuing playlist from link",
"**${item.tracks.first().info.title}**\n*${item.playlistInfo.name}*\nby ${item.tracks.first().info.author} :: ${ "**${item.tracks.first().info.title}**\n*${item.playlistInfo.name}*\nby ${item.tracks.first().info.author} ;: ${
TimeUtil.getTimeFormatedRaw( TimeUtil.getTimeFormatedRaw(
item.tracks.first().info.length item.tracks.first().info.length
) )
@ -137,7 +137,7 @@ object MusicManager {
MessageUtil.getEmbedWithImage( MessageUtil.getEmbedWithImage(
Color(0x52E01A), Color(0x52E01A),
"Queuing track from query", "Queuing track from query",
"**${item.tracks.first().info.title}**\n*Queue*\nby ${item.tracks.first().info.author} :: ${ "**${item.tracks.first().info.title}**\n*Queue*\nby ${item.tracks.first().info.author} ;: ${
TimeUtil.getTimeFormatedRaw( TimeUtil.getTimeFormatedRaw(
item.tracks.first().info.length item.tracks.first().info.length
) )