Fix 'all time stars'

This commit is contained in:
Brian Buller 2021-12-01 13:13:55 -06:00
parent 14e2827377
commit 9ab1706b9d

View File

@ -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 {