mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Update bank.py (#1937)
This commit is contained in:
parent
f24290c423
commit
f6823ea3d1
@ -191,7 +191,7 @@ async def set_balance(member: discord.Member, amount: int) -> int:
|
||||
|
||||
|
||||
def _invalid_amount(amount: int) -> bool:
|
||||
return amount <= 0
|
||||
return amount < 0
|
||||
|
||||
|
||||
async def withdraw_credits(member: discord.Member, amount: int) -> int:
|
||||
@ -217,7 +217,7 @@ async def withdraw_credits(member: discord.Member, amount: int) -> int:
|
||||
|
||||
"""
|
||||
if _invalid_amount(amount):
|
||||
raise ValueError("Invalid withdrawal amount {} <= 0".format(amount))
|
||||
raise ValueError("Invalid withdrawal amount {} < 0".format(amount))
|
||||
|
||||
bal = await get_balance(member)
|
||||
if amount > bal:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user