update owner cmds

This commit is contained in:
un1xx committed 2025-05-11 17:07:18 +05:30
1 parent ca40b33099
commit 29ab3110e5
3 files changed
+22 -23

No files matched your search

+7 -4
View File
@@ -180,7 +180,7 @@ class Banking(commands.Cog):
@commands.has_any_role("Government", "The Croak Council")
@commands.command(aliases=["wc"])
async def warchest(self, ctx: CustomCtx):
async def warchest(self, ctx: CustomCtx, ids: Optional[commands.Greedy[int]]=None):
"""
refill warchest of all members
"""
@@ -201,6 +201,8 @@ class Banking(commands.Cog):
)
gator = gator.nations[0]
nations.append(gator)
if ids:
nations = [n for n in nations if n.id in ids]
for nation in nations:
if nation.id not in self.WARCHEST_IDS:
@@ -261,9 +263,6 @@ class Banking(commands.Cog):
description="\u200b",
)
i = 0
for rd in resource_delta:
i += 1
e.description += f"{i}. [{rd.get('name')}](https://politicsandwar.com/nation/id={rd.get('id')})\n"
total = {
"money": 0,
"gasoline": 0,
@@ -275,6 +274,10 @@ class Banking(commands.Cog):
"steel40": 0,
}
for rd in resource_delta:
i += 1
e.description += f"{i}. [{rd.get('name')}](https://politicsandwar.com/nation/id={rd.get('id')})\n"
total["money"] += max(0, rd.get("money"))
total["steel100"] += max(0, rd.get("steel100"))
total["steel40"] += max(0, rd.get("steel40"))