mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[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:
parent
7aa829fa8c
commit
5bd7a23864
@ -143,7 +143,7 @@ async def can_spend(member: discord.Member, amount: int) -> bool:
|
|||||||
"""
|
"""
|
||||||
if _invalid_amount(amount):
|
if _invalid_amount(amount):
|
||||||
return False
|
return False
|
||||||
return await get_balance(member) > amount
|
return await get_balance(member) >= amount
|
||||||
|
|
||||||
|
|
||||||
async def set_balance(member: discord.Member, amount: int) -> int:
|
async def set_balance(member: discord.Member, amount: int) -> int:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user