From 76247e0d638939ad0696444411cce47b43bd040a Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Thu, 2 Dec 2021 07:30:17 -0600 Subject: [PATCH] Try to fix that all years star count again --- plugins_src/plugin_aoc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins_src/plugin_aoc.go b/plugins_src/plugin_aoc.go index 8de9eeb..aaf1b57 100644 --- a/plugins_src/plugin_aoc.go +++ b/plugins_src/plugin_aoc.go @@ -411,11 +411,13 @@ func (s *AoCState) AoCBoardCheckAndUpdate(yr int) { plural = "stars" } mbrAll := s.getMemberAllYears(v.ID) + // Gather all stars from all leaderboards var totalStars int for _, v := range mbrAll { totalStars += v.Stars } - allYearsText := fmt.Sprintf(" (%d for all years)", totalStars+v.Stars) + // Add this new one into the total + allYearsText := fmt.Sprintf(" (%d for all years)", totalStars+1) 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 {