This commit is contained in:
un1xx committed 2025-04-18 18:28:48 +05:30
1 parent c070c62737
commit f13054e598
1 file changed
+13
+13
View File
@@ -265,6 +265,19 @@ class WarMonitor(commands.Cog):
await channel.send(embeds=[war_card], view=button)
await self.calc_inrange(war, channel)
@commands.command()
@commands.has_permissions(administrator=True)
async def sync_wars(self, ctx: CustomCtx):
# get all alliance active wars
wars = await self.kit.query(
"wars",
{alliance_id: MONITORED_ALLIANCES, status: "ACTIVE"},
"id, att_id, def_id, turns_left, att_points, def_points, att_resistance, def_resistance, ground_control, air_superiority, naval_blockade, war_type",
)
wars = wars.wars
wars = [war for war in wars if war.def_alliance_id in MONITORED_ALLIANCES]
for war in wars:
await self.war_logger(war)
async def setup(bot: Brahmos):
await bot.add_cog(WarMonitor(bot))