forked from rDrama/rDrama
1
0
Fork 0

block shadowbanned currency transfers

master
Aevann 2024-05-17 01:05:14 +03:00
parent e17904e938
commit 3583f14f6f
1 changed files with 3 additions and 0 deletions

View File

@ -143,6 +143,9 @@ def transfer_currency(v, username, currency_name, apply_tax):
if apply_tax and not v.patron and not receiver.patron:
tax = math.ceil(amount*TAX_PCT)
if v.shadowbanned:
return {"message": f"{amount - tax} {currency_name} have been transferred to @{receiver.username}"}
reason = request.values.get("reason", "").strip()
log_message = f"@{v.username} has transferred {amount} {currency_name} to @{receiver.username}"
notif_text = f":marseycapitalistmanlet: @{v.username} has gifted you {amount-tax} {currency_name}!"