diff --git a/exts/banking.py b/exts/banking.py index 62e79da..c8c8808 100644 --- a/exts/banking.py +++ b/exts/banking.py @@ -353,7 +353,7 @@ class Banking(commands.Cog): ) @commands.has_role(987770837627187250) @commands.command() - async def rss(self, ctx: CustomCtx, ids: commands.Greedy[int] = []): + async def rss(self, ctx: CustomCtx, ids: commands.Greedy[int] = [], nation_names: commands.Greedy[str] = []): """get resources of a nation in alliance Args: @@ -368,12 +368,20 @@ class Banking(commands.Cog): aiohttp_session=aiohttp.ClientSession(loop=self.bot.loop), ) embeds = [] + for n in nation_names: + result = await self.kit.query( + "nations", + {"nation_name": n, "first": 1}, + "id" + ) + ids.append(result.nations[0].id) + for id in ids: kit = self.kit if (id != 103764) else d_kit nation = await kit.query( "nations", {"id": id, "first": 1}, - "id, nation_name, discord,money, flag, food, uranium, coal, iron, oil, bauxite, iron, lead, munitions, gasoline, aluminum, steel, num_cities", + "id, nation_name, discord,money, flag, food, uranium, coal, iron, oil, bauxite, iron, lead, munitions, gasoline, aluminum, steel, num_cities, credits", ) nation = nation.nations[0] e = discord.Embed( @@ -395,7 +403,8 @@ class Banking(commands.Cog): f"{Emojis.munitions} {nation.munitions:,}\n" f"{Emojis.gasoline} {nation.gasoline:,}\n" f"{Emojis.aluminum} {nation.aluminum:,}\n" - f"{Emojis.steel} {nation.steel:,}" + f"{Emojis.steel} {nation.steel:,}\n" + f"{Emojis.credits} {nation.credits}\n" ) embeds.append(e) diff --git a/utils/emojis.py b/utils/emojis.py index b83617d..f237534 100644 --- a/utils/emojis.py +++ b/utils/emojis.py @@ -14,3 +14,4 @@ class Emojis: oil = "<:oil:1220371873267843143>" coal = "<:coal:1220371877013229619>" money = "<:dollarsym:1220378339970252841>" + credits = "<:credits:1280569595366867066>"