fix bug in war attack logger

This commit is contained in:
un1xx committed 2025-11-08 13:58:10 +05:30
1 parent b5682d7070
commit 9bf35bef61
2 files changed
+15 -13

No files matched your search

+4 -4
View File
@@ -454,9 +454,9 @@ class WarMonitor(commands.Cog):
return msg
@log_errors
async def warattack_logger(self, warattack: pnwkit.WarAttack):
async def warattack_logger(self, warattack: pnwkit.data.WarAttack):
await self.log_ally_attacks(warattack)
if not warattack.war_id in self.monitored_wars:
if warattack.war_id not in self.monitored_wars:
return
war = await get_war(self.kit, warattack.war_id)
channel = await self.get_war_channel(war.id)
@@ -469,8 +469,8 @@ class WarMonitor(commands.Cog):
msg = self.construct_message(warattack, attacker, defender)
await channel.send(msg)
async def log_ally_attacks(self, warattack: pnwkit.WarAttack):
if not warattack.att_id in self.allied_nations:
async def log_ally_attacks(self, warattack: pnwkit.data.WarAttack):
if warattack.att_id not in self.allied_nations:
return
channel = await self.bot.fetch_channel(ALLIANCE_ATK_CH)
attacker, defender = await get_nation(