From d6759b3bf873ed711382c021c0f5be81b6964fbc Mon Sep 17 00:00:00 2001 From: un1xx Date: Wed, 16 Apr 2025 23:28:32 +0530 Subject: [PATCH] update --- exts/war_monitor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exts/war_monitor.py b/exts/war_monitor.py index 401c9e2..0ddb71e 100644 --- a/exts/war_monitor.py +++ b/exts/war_monitor.py @@ -70,7 +70,7 @@ class WarMonitor(commands.Cog): return f"{num/1000:,.1f}" else: return num - def build_embed(nation_id: int, color: discord.Color): + async def build_embed(nation_id: int, color: discord.Color): nation = await self.kit.query( "nations", {"id": nation_id, "first": 1}, @@ -98,8 +98,8 @@ class WarMonitor(commands.Cog): if war.att_alliance_id: # in MONITORED_ALLIANCES: - embed1 = build_embed(war.att_id, discord.Color.green()) - embed2 = build_embed(war.def_id, discord.Color.green()) + embed1 = await build_embed(war.att_id, discord.Color.green()) + embed2 = await build_embed(war.def_id, discord.Color.green()) embed2.timestamp = datetime.datetime.now() view = url_button_view(war) @@ -108,8 +108,8 @@ class WarMonitor(commands.Cog): if war.def_alliance_id: #in MONITORED_ALLIANCES: - embed1 = build_embed(war.att_id, discord.Color.green()) - embed2 = build_embed(war.def_id, discord.Color.green()) + embed1 = await build_embed(war.att_id, discord.Color.green()) + embed2 = await build_embed(war.def_id, discord.Color.green()) embed2.timestamp = datetime.datetime.now() view = url_button_view(war)