From 6550bb152ee7d74210ede9084fafe754d8cfb4bd Mon Sep 17 00:00:00 2001 From: jowj Date: Tue, 21 Jan 2020 16:24:42 -0600 Subject: [PATCH] Change sequntial ifs to elifs. --- 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 3646516..2b3da53 100644 --- a/mojo-rtm/mojo-rtm.py +++ b/mojo-rtm/mojo-rtm.py @@ -72,16 +72,16 @@ def handle_messages(**payload): if is_command != (None, None): if is_command[1].startswith("say"): response = f"{is_command[1]}" - if is_command[1].startswith("furry"): + elif is_command[1].startswith("furry"): response = f"{is_command[1]}" - if is_command[1].startswith("download"): + elif is_command[1].startswith("download"): response = "you wouldn't download a car" - if "arke" in is_command[1]: + elif "arke" in is_command[1]: response = [] with open("/shared/state.log", "r") as json_File: for line in json_File: response.append(json.loads(line)) - if "pence" in is_command[1]: + elif "pence" in is_command[1]: response = "mother wouldn't want me to say that" else: response = "that's not my job, bithc"