From d54f72acbea425417d734b8c406cfe7d32aa3f35 Mon Sep 17 00:00:00 2001 From: riazufila <46749569+riazufila@users.noreply.github.com> Date: Sun, 9 May 2021 10:14:29 +0800 Subject: [PATCH 1/2] Set min gamble to exp --- cogs/currency.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cogs/currency.py b/cogs/currency.py index 8602d6a..0902b76 100644 --- a/cogs/currency.py +++ b/cogs/currency.py @@ -161,6 +161,11 @@ async def gamble(self, ctx, gems: int): # 50% chance of gambled gems being negative or positive gems_obtained = random.choices([-gems, gems], [50, 50], k=1) + # Only increase User EXP on 500 or more gamble + legit_gamble = False + if gems >= 500: + legit_gamble = True + # Assign gem amount from array to single variable for gems in gems_obtained: gems = gems @@ -195,7 +200,10 @@ async def gamble(self, ctx, gems: int): db_ailie.store_gems(ctx.author.id, gems) db_ailie.store_gamble_count(ctx.author.id) - db_ailie.update_user_exp(ctx.author.id, 10) + + if legit_gamble: + db_ailie.update_user_exp(ctx.author.id, 10) + db_ailie.disconnect() await ctx.send(random.choice(reply)) From d2e1b4fa76bf6271dc385ad6ea4c048612f432e3 Mon Sep 17 00:00:00 2001 From: riazufila <46749569+riazufila@users.noreply.github.com> Date: Sun, 9 May 2021 10:14:49 +0800 Subject: [PATCH 2/2] Updated version info --- cogs/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/bot.py b/cogs/bot.py index 82b80d6..4435dfa 100644 --- a/cogs/bot.py +++ b/cogs/bot.py @@ -187,7 +187,7 @@ async def version(self, ctx): db_ailie.disconnect() # Change upon version update - version = "1.5.3" + version = "1.5.4" # Mimic loading animation msg = await ctx.send(