diff --git a/zulip_bots/zulip_bots/pubbot.py b/zulip_bots/zulip_bots/pubbot.py index 1acf493..8bece91 100644 --- a/zulip_bots/zulip_bots/pubbot.py +++ b/zulip_bots/zulip_bots/pubbot.py @@ -133,7 +133,8 @@ def main(conf_file, message_log_file, name=socket.gethostname()): log["giveaway_entries"] = entries entries_str = " ({} entries of ${:.2f})".format(entries, giveaway_amount) logging.info("New donation total: {}{}{}".format(msg["d"], increase_str, entries_str)) - client.send_to_stream("bot-spam", "Donation Firehose", "Donation total is now ${:.2f}{}{}".format(msg["d"], increase_str, entries_str)) + if increase is not None and increase > 0: + client.send_to_stream("bot-spam", "Donation Firehose", "Donation total is now ${:.2f}{}{}".format(msg["d"], increase_str, entries_str)) if increase is not None and increase >= 500: client.send_to_stream("bot-spam", "Notable Donations", "Large donation of ${:.2f} (total ${:.2f}){}".format(increase, msg['d'], entries_str)) total = msg["d"]