fix coin debt exploit
This commit is contained in:
parent
b3e84736dc
commit
9ec7f92a4c
4
coin.rb
4
coin.rb
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user