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")
|
||||
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:
|
||||
|
||||
Reference in new issue
Block a user