newsbid: filter zero balances

This commit is contained in:
Chris Sexton 2021-06-17 12:57:52 -04:00 committed by Chris Sexton
parent ec47c31a80
commit 9eb801f570
1 changed files with 3 additions and 1 deletions

View File

@ -99,7 +99,9 @@ func (p *NewsBid) scoresCmd(r bot.Request) bool {
out := "NGate balances:\n" out := "NGate balances:\n"
sort.Sort(bals) sort.Sort(bals)
for _, b := range bals { for _, b := range bals {
out += fmt.Sprintf("%s has a total score of %d with %d left to bid this session\n", b.User, b.Score, b.Balance) if b.Score > 0 {
out += fmt.Sprintf("%s has a total score of %d with %d left to bid this session\n", b.User, b.Score, b.Balance)
}
} }
p.bot.Send(r.Conn, bot.Message, ch, out) p.bot.Send(r.Conn, bot.Message, ch, out)
return true return true