Skip to content

Commit

Permalink
Merge pull request #110 from riazufila/release-v1.5.4
Browse files Browse the repository at this point in the history
Release v1.5.4
  • Loading branch information
riazufila authored May 9, 2021
2 parents 853459b + d2e1b4f commit b65517c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cogs/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 9 additions & 1 deletion cogs/currency.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit b65517c

Please sign in to comment.