Hendrik Langer 2 years ago
parent
commit
f0c4b6612c
  1. 5
      matrix_pygmalion_bot/core.py

5
matrix_pygmalion_bot/core.py

@ -147,7 +147,7 @@ class Callbacks(object):
elif event.body.startswith('!image_negative_prompt'): elif event.body.startswith('!image_negative_prompt'):
negative_prompt = event.body.removeprefix('!image_negative_prompt').strip() negative_prompt = event.body.removeprefix('!image_negative_prompt').strip()
if len(prompt) > 0: if len(negative_prompt) > 0:
self.bot.negative_prompt = negative_prompt self.bot.negative_prompt = negative_prompt
else: else:
self.bot.negative_prompt = None self.bot.negative_prompt = None
@ -193,6 +193,9 @@ class Callbacks(object):
new_answer = event.body.removeprefix('!replace').strip() 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) await self.bot.send_message(self.client, room.room_id, new_answer, reply_to=chat_history_item.relates_to_event)
return return
elif event.body.startswith('!'):
await self.bot.send_message(self.client, room.room_id, "UNKNOWN COMMAND")
return
# Other commands # Other commands
if re.search("^(?=.*\bsend\b)(?=.*\bpicture\b).*$", event.body): if re.search("^(?=.*\bsend\b)(?=.*\bpicture\b).*$", event.body):

Loading…
Cancel
Save