From 4cf843aa36b2e4978bc60db079a17fd2d1da7448 Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Tue, 19 Apr 2022 14:03:52 +0300 Subject: [PATCH] Very naive and basic target error capture --- ameliabot/owncast.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ameliabot/owncast.py b/ameliabot/owncast.py index afc44cc..4e3b3a4 100644 --- a/ameliabot/owncast.py +++ b/ameliabot/owncast.py @@ -117,7 +117,10 @@ def process_chat(data): if findme in command_reply: if placeholders[placeholder] == "": command_reply = "%s required" % placeholder.upper() - command_reply = command_reply.replace( - findme, placeholders[placeholder]) + try: + command_reply = command_reply.replace( + findme, placeholders[placeholder]) + except TypeError: + command_reply = "Target not specified." return command_reply