From dbec4ee96219b28b06e951de57c7720f8d8eda76 Mon Sep 17 00:00:00 2001 From: un1xx Date: Fri, 6 Jun 2025 21:24:28 +0530 Subject: [PATCH] update refill cmd --- exts/banking.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/exts/banking.py b/exts/banking.py index 8a1b5f9..acf1518 100644 --- a/exts/banking.py +++ b/exts/banking.py @@ -1382,7 +1382,10 @@ class Banking(commands.Cog): await ctx.send(f"> calculating raws") revenue_data = await self.get_alliance_rev(ids) def calc_tosend(raw: float, on_nation: float): - return int(7 * abs(raw) - on_nation) + net = int(7 * abs(raw) - on_nation) + if net < 0: + return 0 + return net embeds = [] e = discord.Embed( @@ -1433,13 +1436,13 @@ class Banking(commands.Cog): data["refill"].update(bauxite=tosend) text += f"{Emojis.bauxite} {tosend:,}" total["bauxite"] += tosend + + if not text: + text = "already satisfied" e.add_field( name=f"{data.get('nation_name')} (c{data.get('num_cities')})", - value=( - f"[go to nation](https://politicsandwar.com/nation/id={data.get('nation_id')}) \n\n" - f"{text}" - ), + value=text ) count += 1 if count == 9: