forked from rDrama/rDrama
1
0
Fork 0

fix mbux -> coins

master
justcool393 2022-11-01 03:54:02 -05:00
parent 8bd637df57
commit 62e171c09a
1 changed files with 6 additions and 1 deletions

View File

@ -290,7 +290,12 @@ def transfer_currency(v:User, username:str, currency_name:Literal['coins', 'proc
abort(400, f"You don't have enough {friendly_currency_name}")
if not v.shadowbanned:
receiver.coins += amount - tax
if currency_name == 'procoins':
receiver.procoins += amount - tax
elif currency_name == 'coins':
receiver.coins += amount - tax
else:
raise ValueError(f"Invalid currency '{currency_name}' got when transferring {amount} from {v.id} to {receiver.id}")
g.db.add(receiver)
send_repeatable_notification(GIFT_NOTIF_ID, log_message)
send_repeatable_notification(receiver.id, notif_text)