Fix 'all time stars'
This commit is contained in:
parent
14e2827377
commit
9ab1706b9d
@ -415,10 +415,7 @@ func (s *AoCState) AoCBoardCheckAndUpdate(yr int) {
|
|||||||
for _, v := range mbrAll {
|
for _, v := range mbrAll {
|
||||||
totalStars += v.Stars
|
totalStars += v.Stars
|
||||||
}
|
}
|
||||||
allYearsText := ""
|
allYearsText := fmt.Sprintf(" (%d for all years)", totalStars+v.Stars)
|
||||||
if totalStars > 0 {
|
|
||||||
allYearsText = fmt.Sprintf(" (%d for all years)", totalStars)
|
|
||||||
}
|
|
||||||
if yr == s.GetLatestYear() {
|
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)
|
s.SendSlackMessage(fmt.Sprintf(":christmas_tree: %s now has %d %s! :christmas_tree:%s", v.Name, v.Stars, plural, allYearsText), channelId)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user