add multi-lang support for usage of multiple honey jars at once
@@ -1072,21 +1072,19 @@ class Econ(commands.Cog):
if thing == "honey jar":
db_user = await self.db.fetch_user(ctx.author.id)
- if db_user["health"] >= 20:
- await self.bot.send(ctx, f"You already have full health (20/20 {self.d.emojis.heart_full})")
- elif db_user["health"] + amount > 20:
+ if db_user["health"] + amount > 20:
max_amount = 20 - db_user["health"]
- if max_amount == 0:
- await self.bot.send(ctx, f"You can't use any {'Honey Jars'} right now.")
+ if max_amount < 1:
+ await self.bot.send(ctx, ctx.l.econ.use.cant_use_any.format("Honey Jars"))
else:
- await self.bot.send(ctx, f"You can't use any more than {max_amount} {'Honey Jar'} right now.")
+ await self.bot.send(ctx, ctx.l.econ.use.cant_use_up_to.format(max_amount, "Honey Jar"))
else:
await self.db.update_user(ctx.author.id, 'health', db_user['health']+amount)
await self.db.remove_item(ctx.author.id, 'Honey Jar', amount)
new_health = amount + db_user["health"]
- await self.bot.send(ctx, f"You've chugged {amount}x Honey Jars! (You now have {new_health}/20 {self.d.emojis.heart_full})")
+ await self.bot.send(ctx, ctx.l.econ.use.chug_honey.format(amount, new_health, self.d.emojis.heart_full))
return
