From 0739d9e3ca75ec1800d27092ebbbfc874a8f2d4d Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Tue, 4 Aug 2020 18:54:49 +0200 Subject: [PATCH] :bug: --- funcs/games/money.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/funcs/games/money.py b/funcs/games/money.py index ef3100e..0ab8283 100644 --- a/funcs/games/money.py +++ b/funcs/games/money.py @@ -35,18 +35,22 @@ def giveMoney(user,targetUser,amount): targetUser = getID(targetUser) - if targetUser.startswith("#"): - if user in data: - if data[user]["money"] >= amount: - addMoney(user,-1 * amount) - addMoney(targetUser,amount) - return "Transferred "+str(amount)+" GwendoBucks to "+getName(targetUser) + if amount > 0: + if targetUser.startswith("#"): + if user in data: + if data[user]["money"] >= amount: + addMoney(user,-1 * amount) + addMoney(targetUser,amount) + return "Transferred "+str(amount)+" GwendoBucks to "+getName(targetUser) + else: + logThis("They didn't have enough GwendoBucks (error code 1223b)") + return "You don't have that many GwendoBucks (error code 1223b)" else: - logThis("They didn't have enough GwendoBucks (error code 1223b)") - return "You don't have that many GwendoBucks (error code 1223b)" + logThis("They didn't have enough GwendoBucks (error code 1223a)") + return "You don't have that many GwendoBucks (error code 1223a)" else: - logThis("They didn't have enough GwendoBucks (error code 1223a)") - return "You don't have that many GwendoBucks (error code 1223a)" + logThis("They weren't in the system") + return "The target doesn't exist" else: - logThis("They weren't in the system") - return "The target doesn't exist" \ No newline at end of file + logThis("They tried to steal") + return "Yeah, no. You can't do that"