forked from rDrama/rDrama
vcvc
parent
1a2ce45b1f
commit
02250137d3
|
@ -476,4 +476,5 @@ def transfers(v):
|
||||||
next_exists = len(comments) > 25
|
next_exists = len(comments) > 25
|
||||||
comments = comments[:25]
|
comments = comments[:25]
|
||||||
|
|
||||||
|
if request.headers.get("Authorization"): return {"data": [x.json for x in comments]}
|
||||||
return render_template("transfers.html", v=v, page=page, comments=comments, standalone=True, next_exists=next_exists)
|
return render_template("transfers.html", v=v, page=page, comments=comments, standalone=True, next_exists=next_exists)
|
|
@ -279,6 +279,10 @@ def transfer_bux(v, username):
|
||||||
if v.procoins < amount: return {"error": "You don't have enough marseybux"}, 400
|
if v.procoins < amount: return {"error": "You don't have enough marseybux"}, 400
|
||||||
if amount < 100: return {"error": "You have to gift at least 100 marseybux."}, 400
|
if amount < 100: return {"error": "You have to gift at least 100 marseybux."}, 400
|
||||||
|
|
||||||
|
if TAX_RECEIVER_ID:
|
||||||
|
log_message = f"[@{v.username}](/id/{v.id}) has transferred {amount} marseybux to [@{receiver.username}]({receiver.id})"
|
||||||
|
send_repeatable_notification(TAX_RECEIVER_ID, log_message)
|
||||||
|
|
||||||
receiver.procoins += amount
|
receiver.procoins += amount
|
||||||
v.procoins -= amount
|
v.procoins -= amount
|
||||||
send_repeatable_notification(receiver.id, f"🤑 [@{v.username}](/id/{v.id}) has gifted you {amount} marseybux!")
|
send_repeatable_notification(receiver.id, f"🤑 [@{v.username}](/id/{v.id}) has gifted you {amount} marseybux!")
|
||||||
|
|
Loading…
Reference in New Issue