From 5bd7a238641319ac289721124d3b606c08dba95c Mon Sep 17 00:00:00 2001 From: Redjumpman Date: Thu, 11 Jan 2018 13:26:34 -0600 Subject: [PATCH] [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. --- redbot/core/bank.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redbot/core/bank.py b/redbot/core/bank.py index ebcf72ce8..51ec1b69b 100644 --- a/redbot/core/bank.py +++ b/redbot/core/bank.py @@ -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: