Mods
This commit is contained in:
parent
c38e571ceb
commit
02d12bc506
9
main.py
9
main.py
|
@ -226,15 +226,15 @@ async def on_message(ws, message):
|
|||
except BaseException:
|
||||
return
|
||||
|
||||
if data["type"] == "files":
|
||||
dta = data.get("data")
|
||||
|
||||
if not dta:
|
||||
return
|
||||
|
||||
if dta.get("name") == username:
|
||||
if dta["name"] == username:
|
||||
return
|
||||
|
||||
if data["type"] == "files":
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue