From 02d12bc506e161b101f284e961754831559e452a Mon Sep 17 00:00:00 2001 From: Auric Vente Date: Sat, 20 Apr 2024 13:09:10 -0600 Subject: [PATCH] Mods --- main.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/main.py b/main.py index 9ef60e3..316d4ac 100644 --- a/main.py +++ b/main.py @@ -226,15 +226,15 @@ async def on_message(ws, message): except BaseException: return - dta = data.get("data") - - if not dta: - return - - if dta.get("name") == username: - return - if data["type"] == "files": + dta = data.get("data") + + if not dta: + return + + if dta["name"] == username: + return + files = dta.get("files") if not files: @@ -253,7 +253,10 @@ async def on_message(ws, message): if blocked(): return - text = dta["text"].strip() + if data["data"]["name"] == username: + return + + text = data["data"]["text"].strip() if not text.startswith(prefix): return