Detection/UserBot/api_raw.py
CHANGED
@@ -23,6 +23,7 @@ SOFTWARE.
|
|
23 |
"""
|
24 |
|
25 |
from pyrogram import Client
|
|
|
26 |
import logging
|
27 |
import asyncio
|
28 |
from Detection import assistant
|
@@ -166,7 +167,6 @@ async def check_raw(client: Client, update, users, chats):
|
|
166 |
)
|
167 |
)
|
168 |
for cid, chat in chats.items():
|
169 |
-
LOGS.info(f"Update Chat: {chat}")
|
170 |
if isinstance(chat, ChannelForbidden):
|
171 |
return await assistant.send_message(
|
172 |
client.me.id,
|
@@ -295,17 +295,20 @@ async def check_raw(client: Client, update, users, chats):
|
|
295 |
keyboard = []
|
296 |
if chat.username is None:
|
297 |
keyboard.append([
|
298 |
-
InlineKeyboardButton("View Channel", url=f"https://t.me/c/{cid}/-1")
|
|
|
299 |
])
|
300 |
else:
|
301 |
keyboard.append([
|
302 |
-
InlineKeyboardButton("View Username", url=f"https://t.me/{chat.username}")
|
|
|
303 |
])
|
|
|
304 |
return await assistant.send_message(
|
305 |
client.me.id,
|
306 |
f"#BROADCAST_ALERT\n"
|
307 |
f"**Channel:** {chat.title}\n"
|
308 |
-
f"**Date:** {
|
309 |
f"**ID:** `{cid}`\n"
|
310 |
f"**Access hash:** `{chat.access_hash}`\n",
|
311 |
link_preview_options=LinkPreviewOptions(is_disabled=True),
|
|
|
23 |
"""
|
24 |
|
25 |
from pyrogram import Client
|
26 |
+
from datetime import datetime as dt
|
27 |
import logging
|
28 |
import asyncio
|
29 |
from Detection import assistant
|
|
|
167 |
)
|
168 |
)
|
169 |
for cid, chat in chats.items():
|
|
|
170 |
if isinstance(chat, ChannelForbidden):
|
171 |
return await assistant.send_message(
|
172 |
client.me.id,
|
|
|
295 |
keyboard = []
|
296 |
if chat.username is None:
|
297 |
keyboard.append([
|
298 |
+
InlineKeyboardButton("View Channel", url=f"https://t.me/c/{cid}/-1"),
|
299 |
+
InlineKeyboardButton("Copy ChatID", copy_text=f"Copy: -100{cid}")
|
300 |
])
|
301 |
else:
|
302 |
keyboard.append([
|
303 |
+
InlineKeyboardButton("View Username", url=f"https://t.me/{chat.username}"),
|
304 |
+
InlineKeyboardButton("Copy ChatID", copy_text=f"Copy: -100{cid}")
|
305 |
])
|
306 |
+
object_time = dt.fromtimestamp(chat.date)
|
307 |
return await assistant.send_message(
|
308 |
client.me.id,
|
309 |
f"#BROADCAST_ALERT\n"
|
310 |
f"**Channel:** {chat.title}\n"
|
311 |
+
f"**Date:** {object_time}\n"
|
312 |
f"**ID:** `{cid}`\n"
|
313 |
f"**Access hash:** `{chat.access_hash}`\n",
|
314 |
link_preview_options=LinkPreviewOptions(is_disabled=True),
|