update
This commit is contained in:
1 parent
c070c62737
commit
f13054e598
1 file changed
+13
@@ -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))
|
||||
Reference in new issue
Block a user