add some print statements to claim_rewards

pull/110/head
Aevann 2023-02-02 06:14:09 +02:00
parent 9135a1a241
commit 6a53fa2063
1 changed files with 9 additions and 0 deletions

View File

@ -1291,10 +1291,15 @@ def claim_rewards(v):
transaction.claimed = True
g.db.add(transaction)
print(f'{v.username}: {v.marseybux}', flush=True)
v.pay_account('marseybux', marseybux)
print(f'{v.username}: {v.marseybux}', flush=True)
send_repeatable_notification(v.id, f"You have received {marseybux} Marseybux! You can use them to buy awards or hats in the [shop](/shop) or gamble them in the [casino](/casino).")
g.db.add(v)
print(f'{v.username}: {v.patron}', flush=True)
if highest_tier > v.patron:
v.patron = highest_tier
v.patron_utc = time.time() + 2937600
@ -1302,6 +1307,10 @@ def claim_rewards(v):
g.db.delete(badge)
badge_grant(badge_id=20+highest_tier, user=v)
print(f'{v.username}: {v.patron}', flush=True)
print(f'{v.username} rewards claimed successfully!', flush=True)
KOFI_TOKEN = environ.get("KOFI_TOKEN", "").strip()
if KOFI_TOKEN:
@app.post("/kofi")