fix coin debt exploit

This commit is contained in:
mud mud 2023-03-29 14:05:48 +02:00
parent b3e84736dc
commit 9ec7f92a4c
Signed by untrusted user: mud
GPG Key ID: D29C9385CC54F61C

View File

@ -102,6 +102,10 @@ def give_coin(event)
coin_amount = 5 coin_amount = 5
end end
if reactor_coins < coin_amount
coin_amount = reactor_coins
end
increment_coin(event.message.author.id, coin_amount) increment_coin(event.message.author.id, coin_amount)
increment_coin(event.user.id, -coin_amount) increment_coin(event.user.id, -coin_amount)