From 9ab1706b9d03673986c9b2d15f7af29878656f37 Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Wed, 1 Dec 2021 13:13:55 -0600 Subject: [PATCH] Fix 'all time stars' --- plugins_src/plugin_aoc.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins_src/plugin_aoc.go b/plugins_src/plugin_aoc.go index 3b29077..8de9eeb 100644 --- a/plugins_src/plugin_aoc.go +++ b/plugins_src/plugin_aoc.go @@ -415,10 +415,7 @@ func (s *AoCState) AoCBoardCheckAndUpdate(yr int) { for _, v := range mbrAll { totalStars += v.Stars } - allYearsText := "" - if totalStars > 0 { - allYearsText = fmt.Sprintf(" (%d for all years)", totalStars) - } + allYearsText := fmt.Sprintf(" (%d for all years)", totalStars+v.Stars) if yr == s.GetLatestYear() { s.SendSlackMessage(fmt.Sprintf(":christmas_tree: %s now has %d %s! :christmas_tree:%s", v.Name, v.Stars, plural, allYearsText), channelId) } else {