[V3 Bank] Fix can_spend and withdraw_credits (#1234)

* Fixed equality operator

can_spend function should be using a >= instead > so that you can spend all of your currency.

* Update bank.py

Fix for withdraw using the wrong equality operator.

* Revert withdraw_credits

Reverted withdraw_credits back to original operator.
This commit is contained in:
Redjumpman 2018-01-11 13:26:34 -06:00 committed by Kowlin
parent 7aa829fa8c
commit 5bd7a23864

View File

@ -143,7 +143,7 @@ async def can_spend(member: discord.Member, amount: int) -> bool:
"""
if _invalid_amount(amount):
return False
return await get_balance(member) > amount
return await get_balance(member) >= amount
async def set_balance(member: discord.Member, amount: int) -> int: