diff --git a/matrix_pygmalion_bot/core.py b/matrix_pygmalion_bot/core.py index 0749ee2..67678ee 100644 --- a/matrix_pygmalion_bot/core.py +++ b/matrix_pygmalion_bot/core.py @@ -106,8 +106,8 @@ class Callbacks(object): print(event) await self.bot.send_message(self.client, room.room_id, "Hello World!") return - elif re.search("(?s)^!image(?P[0-9])?(\s(?P.*))?$", event.body): - m = re.search("(?s)^!image(?P[0-9])?(\s(?P.*))?$", event.body) + elif re.search("(?s)^!image(?P[0-9])?(\s(?P.*))?$", event.body, flags=re.DOTALL): + m = re.search("(?s)^!image(?P[0-9])?(\s(?P.*))?$", event.body, flags=re.DOTALL) if m['num']: num = int(m['num']) else: @@ -233,7 +233,7 @@ class Callbacks(object): return # Other commands - if re.search("^(?=.*\bsend\b)(?=.*\bpicture\b).*$", event.body): + if re.search("^(?=.*\bsend\b)(?=.*\bpicture\b).*$", event.body, flags=re.IGNORECASE): # send, mail, drop, snap picture, photo, image, portrait pass