Better time truncation for stream notifications.
This commit is contained in:
parent
56929e6e44
commit
d7f1325ace
|
@ -165,7 +165,7 @@ func PostStreamHistory(ctx context.Context, history *models.TwitchStreamHistory)
|
||||||
if history.EndApproximated {
|
if history.EndApproximated {
|
||||||
approximated = "about "
|
approximated = "about "
|
||||||
}
|
}
|
||||||
duration := history.EndedAt.Sub(history.StartedAt).Truncate(time.Minute).String()
|
duration := history.EndedAt.Sub(history.StartedAt).Truncate(time.Second).String()
|
||||||
messageContent := fmt.Sprintf(
|
messageContent := fmt.Sprintf(
|
||||||
":o: **%s** was live: https://twitch.tv/%s\n> _%s_\nOn <t:%d:F> for %s%s",
|
":o: **%s** was live: https://twitch.tv/%s\n> _%s_\nOn <t:%d:F> for %s%s",
|
||||||
history.TwitchLogin,
|
history.TwitchLogin,
|
||||||
|
|
Loading…
Reference in New Issue