This commit is contained in:
un1xx committed 2025-04-21 18:32:11 +05:30
1 parent 0fa2422f0b
commit c1b6544962
5 files changed
+295 -39

No files matched your search

+26 -10
View File
@@ -393,21 +393,33 @@ class Banking(commands.Cog):
embeds = []
if nation_names:
nation_names = nation_names.split(",")
for n in nation_names:
result = await self.kit.query(
"nations", {"nation_name": n, "first": 1}, "id"
)
ids.append(result.nations[0].id)
result = await self.kit.query(
"nations",
{"nation_name": nation_names},
"id"
)
for nation in result.nations:
ids.append(nation.id)
if not ids:
ids = FILL
for id in ids:
kit = self.kit if (id != 103764) else self.dkit
nation = await kit.query(
nations = []
if 103764 in ids:
ids.remove(103764)
kit = self.dkit
result = await kit.query(
"nations",
{"id": id, "first": 1},
{"id": 103764, "first": 1},
"id, nation_name,leader_name, discord,money, flag, food, uranium, coal, iron, oil, bauxite, iron, lead, munitions, gasoline, aluminum, steel, num_cities, credits",
)
nation = nation.nations[0]
nations.extend(result.nations)
kit = self.kit
result = await kit.query(
"nations",
{"id": ids},
"id, nation_name,leader_name, discord,money, flag, food, uranium, coal, iron, oil, bauxite, iron, lead, munitions, gasoline, aluminum, steel, num_cities, credits",
)
nations.extend(result.nations)
for nation in nations:
e = discord.Embed(
title=f"Resources for {nation.nation_name} c({nation.num_cities})",
color=ctx.author.color,
@@ -799,6 +811,10 @@ class Banking(commands.Cog):
m = await ctx.send(embed=e, view=v)
v.message = m
# @commands.has_role(987770837627187250)
# @commands.command()
# async def refill(self, ctx: CustomCtx, option: str, commands.Greedy[Int] = None, *, names: str = None):
async def setup(bot: Brahmos):