update war logger
This commit is contained in:
1 parent
ae5cdd5bed
commit
c82bb3bd3c
2 files changed
+3
-1
No files matched your search
@@ -303,6 +303,8 @@ class WarMonitor(commands.Cog):
|
||||
self.monitored_wars.append(war.id)
|
||||
category = await self.bot.fetch_channel(CATEGORY)
|
||||
attacker, defender = await get_nation(self.kit, [war.att_id, war.def_id])
|
||||
if defender.alliance_position.name == "APPLICANT":
|
||||
return
|
||||
channel = await category.create_text_channel(
|
||||
name=f"{attacker.nation_name.lower()}-{war.id}"
|
||||
)
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ async def get_nation(kit: pnwkit.QueryKit, id: Union[List[int], int]) -> Union[p
|
||||
nation = await kit.query(
|
||||
"nations",
|
||||
{"id": id},
|
||||
"nation_name, flag, num_cities, soldiers, tanks, aircraft, ships, missiles, score, nukes, id, alliance {name, id, flag}, discord, vacation_mode_turns, color",
|
||||
"nation_name, flag, num_cities, soldiers, tanks, aircraft, ships, missiles, score, nukes, id, alliance {name, id, flag}, discord, vacation_mode_turns, color, alliance_position",
|
||||
)
|
||||
if isinstance(id, list):
|
||||
result = []
|
||||
|
||||
Reference in new issue
Block a user