all repos — paprika @ 534766d447a1d7f759bce2dd4f6c9400117140a5

go rewrite of taigabot

Add formatting output
Anirudh Oppiliappan x@icyphox.sh
Mon, 15 Nov 2021 19:13:11 +0530
commit

534766d447a1d7f759bce2dd4f6c9400117140a5

parent

bdaefbdeb1674762cd448b2b7288d1db2fb9c055

1 files changed, 2 insertions(+), 3 deletions(-)

jump to
M plugins/listenbrainz/nowplaying.goplugins/listenbrainz/nowplaying.go

@@ -52,7 +52,7 @@ if len(li.Payload.Listens) != 0 {

// Now playing a track tm := li.Payload.Listens[0].TrackMetadata return fmt.Sprintf( - `%s is currently listening to "%s" by %s, from the album %s`, + "%s is currently listening to \"%s\" by \x02%s\x02, from the album \x02%s\x02", user, tm.TrackName, tm.ArtistName,

@@ -69,11 +69,10 @@ if err != nil {

return "", err } - fmt.Println(li) tm := li.Payload.Listens[0].TrackMetadata listenedAt, _ := time.Parse(time.RFC1123, li.Payload.Listens[0].InsertedAt) return fmt.Sprintf( - `%s listened to "%s" by %s, from the album %s, %s`, + "%s listened to \"%s\" by \x02%s\x02, from the album \x02%s\x02, %s", user, tm.TrackName, tm.ArtistName,