Detection/UserBot/api_raw.py
CHANGED
@@ -35,6 +35,7 @@ from pyrogram.raw.types import (
|
|
35 |
UpdatePrivacy,
|
36 |
UpdateUserName,
|
37 |
UpdatePinnedMessages,
|
|
|
38 |
PeerUser,
|
39 |
MessageService,
|
40 |
PrivacyKeyProfilePhoto,
|
@@ -61,7 +62,10 @@ async def send_log(client, text):
|
|
61 |
|
62 |
@Client.on_raw_update()
|
63 |
async def check_raw(client: Client, update, users, chats):
|
64 |
-
if isinstance(update,
|
|
|
|
|
|
|
65 |
if not update:
|
66 |
return
|
67 |
peer = update.peer
|
@@ -203,7 +207,7 @@ async def check_raw(client: Client, update, users, chats):
|
|
203 |
elif isinstance(chat, Channel) and getattr(chat, "left", False):
|
204 |
if cid in IGNORE_LOGS:
|
205 |
return
|
206 |
-
await asyncio.sleep(
|
207 |
return await assistant.send_message(
|
208 |
client.me.id,
|
209 |
f"#UNBANNED #LEFT_ALERT\n"
|
@@ -281,7 +285,7 @@ async def check_raw(client: Client, update, users, chats):
|
|
281 |
)
|
282 |
)
|
283 |
elif isinstance(chat, Channel) and getattr(chat, "broadcast", False):
|
284 |
-
await asyncio.sleep(
|
285 |
return await assistant.send_message(
|
286 |
client.me.id,
|
287 |
f"#BROADCAST_ALERT\n"
|
|
|
35 |
UpdatePrivacy,
|
36 |
UpdateUserName,
|
37 |
UpdatePinnedMessages,
|
38 |
+
UpdateTranscribedAudio,
|
39 |
PeerUser,
|
40 |
MessageService,
|
41 |
PrivacyKeyProfilePhoto,
|
|
|
62 |
|
63 |
@Client.on_raw_update()
|
64 |
async def check_raw(client: Client, update, users, chats):
|
65 |
+
if isinstance(update, UpdateTranscribedAudio):
|
66 |
+
LOGS.info(f"Update audio: {update}")
|
67 |
+
|
68 |
+
elif isinstance(update, UpdatePinnedMessages):
|
69 |
if not update:
|
70 |
return
|
71 |
peer = update.peer
|
|
|
207 |
elif isinstance(chat, Channel) and getattr(chat, "left", False):
|
208 |
if cid in IGNORE_LOGS:
|
209 |
return
|
210 |
+
await asyncio.sleep(2.5)
|
211 |
return await assistant.send_message(
|
212 |
client.me.id,
|
213 |
f"#UNBANNED #LEFT_ALERT\n"
|
|
|
285 |
)
|
286 |
)
|
287 |
elif isinstance(chat, Channel) and getattr(chat, "broadcast", False):
|
288 |
+
await asyncio.sleep(2.5)
|
289 |
return await assistant.send_message(
|
290 |
client.me.id,
|
291 |
f"#BROADCAST_ALERT\n"
|