From 9c967371c4c5d2b6ce7005d7a617a0d8d82ad243 Mon Sep 17 00:00:00 2001 From: deadcade Date: Thu, 25 Aug 2022 20:28:14 +0200 Subject: [PATCH] Ignore mautrix-discord rooms --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index fe28bf2..af3ca48 100644 --- a/main.py +++ b/main.py @@ -297,6 +297,10 @@ async def message_callback(room: nio.MatrixRoom, event: nio.RoomMessageText) -> global client, settings, emojis if settings["debug"]: print(f"Message received in room {room.display_name}\n{event.sender} | {event.body}") + # Discord messages need different treatment. Absolutely no commands, and if possible no instant message edits. + # Because selfbots are against ToS on Discord, and will get banned within just a few hours to days of usage. + if " (Discord)" in room.display_name: + return admin = False if event.sender == client.user_id: # If this is our message admin = True