update refill cmd
This commit is contained in:
1 parent
3e1ff8c71e
commit
dbec4ee962
1 file changed
+8
-5
+8
-5
@@ -1382,7 +1382,10 @@ class Banking(commands.Cog):
|
|||||||
await ctx.send(f"> calculating raws")
|
await ctx.send(f"> calculating raws")
|
||||||
revenue_data = await self.get_alliance_rev(ids)
|
revenue_data = await self.get_alliance_rev(ids)
|
||||||
def calc_tosend(raw: float, on_nation: float):
|
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 = []
|
embeds = []
|
||||||
e = discord.Embed(
|
e = discord.Embed(
|
||||||
@@ -1434,12 +1437,12 @@ class Banking(commands.Cog):
|
|||||||
text += f"{Emojis.bauxite} {tosend:,}"
|
text += f"{Emojis.bauxite} {tosend:,}"
|
||||||
total["bauxite"] += tosend
|
total["bauxite"] += tosend
|
||||||
|
|
||||||
|
if not text:
|
||||||
|
text = "already satisfied"
|
||||||
|
|
||||||
e.add_field(
|
e.add_field(
|
||||||
name=f"{data.get('nation_name')} (c{data.get('num_cities')})",
|
name=f"{data.get('nation_name')} (c{data.get('num_cities')})",
|
||||||
value=(
|
value=text
|
||||||
f"[go to nation](https://politicsandwar.com/nation/id={data.get('nation_id')}) \n\n"
|
|
||||||
f"{text}"
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
count += 1
|
count += 1
|
||||||
if count == 9:
|
if count == 9:
|
||||||
|
|||||||
Reference in new issue
Block a user