diff --git a/robottas.py b/robottas.py index fbf6754..20f62df 100755 --- a/robottas.py +++ b/robottas.py @@ -125,6 +125,10 @@ class Robottas(commands.Bot): elif category == "OTHER": if self.session_type == "RACE" and "DELETED" in message['Message']: pass + elif "SLIPPERY" in message['Message'] and \ + not self.is_slippery_reported: + self.is_slippery_reported = True + report = "It's slippery out there!" else: report = message['Message'] @@ -538,6 +542,7 @@ class Robottas(commands.Bot): async def start_collect(self): self.is_collecting = True + self.is_slippery_reported = False dir_path = os.path.dirname(os.path.realpath(__file__)) command_txt = os.path.join(dir_path, self.collector_command) command_txt += self.collector_params @@ -586,6 +591,9 @@ class Robottas(commands.Bot): # Hold weather info self.weather = "" + + # Hold weather we have reported on slippery track. + self.is_slippery_reported = False # Hold lap info self.current_lap = -1000