From 4037d41351e2afd5afdc62c103f0c3af69df626f Mon Sep 17 00:00:00 2001 From: iou1name Date: Mon, 11 Jun 2018 11:17:33 -0400 Subject: [PATCH] added enemy level information --- warbot.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/warbot.py b/warbot.py index 4984eb4..ed65101 100755 --- a/warbot.py +++ b/warbot.py @@ -107,6 +107,8 @@ class WarBot(irc.IRCClient): info = alert["MissionInfo"] node = self.solNodes[info["location"]] mission_type = self.missionTypes[info["missionType"]]["value"] + minLvl = info["minEnemyLevel"] + maxLvl = info["maxEnemyLevel"] credits = info["missionReward"].get("credits") items = info["missionReward"].get("items", []) if items: @@ -125,11 +127,12 @@ class WarBot(irc.IRCClient): message = "\x0300[\x0305ALERT\x0300] " \ + f"\x0310Location\x03: \x0312{node['value']}\x03 | " \ - + f"\x0310Mission Type\x03: \x0312{mission_type}\x03 | " \ + + f"\x0310Mission Type\x03: \x0312{mission_type}\x03 " \ + + f"(\x0307{minLvl}\x03-\x0307{maxLvl}\x03) | " \ + f"\x0310Expiry\x03: \x0308{expire_diff // 3600}h" \ + f"{expire_diff % 3600 // 60}m\x03 " \ - + f"(\x0308{time.strftime('%H:%M', expire_t)}\x03)" \ - + f" | \x0310Credits\x03: \x0312{credits}\x03" + + f"(\x0308{time.strftime('%H:%M', expire_t)}\x03) | " \ + + f"\x0310Credits\x03: \x0312{credits}\x03" if items: message += f" | \x0310Items: \x0312{', '.join(items)}\x03"