From e546e6be83fd44fce482644e5bccc077772c0ee4 Mon Sep 17 00:00:00 2001 From: Lucas Wung Date: Fri, 18 Jun 2021 14:41:30 -0700 Subject: [PATCH] protected against negative betting --- cogs/economy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/economy.py b/cogs/economy.py index 8023a92..95fc85b 100644 --- a/cogs/economy.py +++ b/cogs/economy.py @@ -99,7 +99,7 @@ async def coinflip(self, ctx: commands.Context, choice:int, amount:int): """Coinflip function, enter 0 for heads 1 for tails""" with model.User(ctx.author).open_economy() as data: if((choice == 0) | (choice == 1)): - if data["money"]>= amount & amount > 0: + if (data["money"]>= amount) & (amount > 0): value = randint(0,1) if value == 0: await ctx.send(embed=core.bot_msg(f"it was heads"))