(economy): Flip bonus logic and fix workout text.

Default to not giving a bonus.
Fix an issue where `workout` was displaying unboosted reward.
This commit is contained in:
2022-01-24 06:48:32 +02:00
parent b213283d95
commit 18d6c977d7
8 changed files with 12 additions and 12 deletions

View File

@@ -61,10 +61,10 @@ async def cmd_set(ctx):
# Postgres `coins` column is `integer`, sanity check postgres int limits - which are smalled than python int range
target_coins_to_set = target_lion.coins + amount
if target_coins_to_set >= 0 and target_coins_to_set <= POSTGRES_INT_MAX:
target_lion.addCoins(amount, ignorebonus=True)
target_lion.addCoins(amount)
elif target_coins_to_set < 0:
target_coins_to_set = -target_lion.coins # Coins cannot go -ve, cap to 0
target_lion.addCoins(target_coins_to_set, ignorebonus=True)
target_lion.addCoins(target_coins_to_set)
target_coins_to_set = 0
else:
return await ctx.embed_reply("Member coins cannot be more than {}".format(POSTGRES_INT_MAX))

View File

@@ -501,7 +501,7 @@ class ReactionRoleMessage:
if price and refund:
# Give the user the refund
lion = Lion.fetch(self.guild.id, member.id)
lion.addCoins(price, ignorebonus=True)
lion.addCoins(price)
# Notify the user
embed = discord.Embed(