logging.info(f"Prize update for {prize_id}: {data}")
ifprize_idnotinprizes:
prizes[prize_id]=get_prize(prize_id)
prize_id=msg["c"].removeprefix("bid:")
log["prize_id"]=prize_id
if"bidder"indataand"bid"indata:
log["bidder"]=data["bidder"]
log["bid"]=data["bid"]
client.send_to_stream("bot-spam","Bids","At <time:{time}>, {bidder} bid ${bid:.2f} for [{title}](https://desertbus.org/prize/{prize_id})".format(
time=message_time,
bidder=data["bidder"],
bid=data["bid"],
title=prizes[prize_id]["title"],
prize_id=prize_id,
))
data=msg["d"]
logging.info(f"Prize update for {prize_id}: {data}")
if"name"indataand"amount"indata:
log["bidder"]=data["name"]
log["bid"]=data["amount"]
client.send_to_stream(
"bot-spam",
"Bids",
"At <time:{message_time}>, {data['name']} ({data['donorID']}) has the high bid of ${data['amount']:.2f} for prize [{prize_id}](https://desertbus.org/prize/{prize_id})",