From 59aba6ba20312cd5755d5ff3f3d22fb892fec81b Mon Sep 17 00:00:00 2001 From: dtookey Date: Fri, 2 Oct 2020 15:23:50 -0400 Subject: [PATCH] Okay, we'll just do the whole thing in a try block --- twitch_script.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/twitch_script.py b/twitch_script.py index 5bbc0e0..efe5a9f 100644 --- a/twitch_script.py +++ b/twitch_script.py @@ -68,19 +68,19 @@ class Twitch_Module(): def eval_commands(self, message: twitch.chat.Message): # containsURL: bool = self.contains_url(message) - first_space_idx = message.text.index(' ') - command_text = ' ' - if first_space_idx > -1: - command_text = message.text[0:first_space_idx] - else: - command_text = message.text - try: + first_space_idx = message.text.index(' ') + command_text = ' ' + if first_space_idx > -1: + command_text = message.text[0:first_space_idx] + else: + command_text = message.text + command = self.commands[command_text] if command is not None and command.command_type is AbstractCommand.CommandType.TWITCH: command.do_command(self, message) except Exception as e: - pass # we don't care + pass # we don't care # if message.text.startswith('!tts start'): # print("tts activated on #" + message.channel) # self.send_message("tts activated")