From eef1cb68f5cc4f6b799fa5919ad1420590e74b96 Mon Sep 17 00:00:00 2001 From: jowj Date: Thu, 30 Jan 2020 15:15:03 -0600 Subject: [PATCH] Move to human readable format from posting. --- mojo-rtm/mojo-rtm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mojo-rtm/mojo-rtm.py b/mojo-rtm/mojo-rtm.py index ead259c..0392a3f 100644 --- a/mojo-rtm/mojo-rtm.py +++ b/mojo-rtm/mojo-rtm.py @@ -92,10 +92,10 @@ def handle_messages(**payload): response = "you wouldn't download a car" elif "arke" in is_command[1]: response = [] - with open("/shared/alerts.log", "r") as json_File: - for line in json_File: - response.append(json.loads(line)) - os.remove("/shared/alerts.log") + with open("/shared/state.json", "r") as json_File: + state = json.load(json_File) + for key, value in state.items(): + response.append(f"{key}: {value}") elif "zalgo" in is_command[1]: # remove zalgo name_removal = re.sub("^zalgo .*?", "", is_command[1])