From f0c4b6612c1a38b52eaecb0e34dce56c795764c1 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Wed, 5 Apr 2023 21:05:53 +0200 Subject: [PATCH] fix --- matrix_pygmalion_bot/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matrix_pygmalion_bot/core.py b/matrix_pygmalion_bot/core.py index 253f897..01796c9 100644 --- a/matrix_pygmalion_bot/core.py +++ b/matrix_pygmalion_bot/core.py @@ -147,7 +147,7 @@ class Callbacks(object): elif event.body.startswith('!image_negative_prompt'): negative_prompt = event.body.removeprefix('!image_negative_prompt').strip() - if len(prompt) > 0: + if len(negative_prompt) > 0: self.bot.negative_prompt = negative_prompt else: self.bot.negative_prompt = None @@ -193,6 +193,9 @@ class Callbacks(object): new_answer = event.body.removeprefix('!replace').strip() await self.bot.send_message(self.client, room.room_id, new_answer, reply_to=chat_history_item.relates_to_event) return + elif event.body.startswith('!'): + await self.bot.send_message(self.client, room.room_id, "UNKNOWN COMMAND") + return # Other commands if re.search("^(?=.*\bsend\b)(?=.*\bpicture\b).*$", event.body):