Compare commits

..

1 Commits

Author SHA1 Message Date
Davide Polonio 5d96cb5dd6 feat: improve formatting output
* duration is now in human readable format
* list of artists is now capped at 140 chars max
2021-11-13 16:30:17 +01:00
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ use crate::spotify::TrackInfo;
use spotify::SpotifyKind::Track;
use crate::spotify::SpotifyKind::{Album, Playlist};
use crate::utils::{human_readable_duration, truncate_with_dots};
use crate::utils::truncate_with_dots;
mod spotify;
mod utils;
@ -35,7 +35,7 @@ async fn main() {
Duration: {} second(s)",
info.name,
truncate_with_dots(info.artists.join(", "), MAX_ARTISTS_CHARS),
human_readable_duration(info.duration)
info.duration.as_secs()
);
Some(message.reply_to(reply).await?)
}