- Detection/UserBot/api_raw.py +11 -11
Detection/UserBot/api_raw.py
CHANGED
@@ -292,22 +292,22 @@ async def check_raw(client: Client, update, users, chats):
|
|
292 |
)
|
293 |
elif isinstance(chat, Channel) and chat.broadcast:
|
294 |
await asyncio.sleep(2.5)
|
295 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
return await assistant.send_message(
|
297 |
client.me.id,
|
298 |
f"#BROADCAST_ALERT\n"
|
299 |
f"**Channel:** {chat.title}\n"
|
300 |
f"**Date:** {chat.date}\n"
|
301 |
f"**ID:** `{cid}`\n"
|
302 |
-
f"**
|
303 |
-
f"**Access hash:** {chat.access_hash}\n",
|
304 |
link_preview_options=LinkPreviewOptions(is_disabled=True),
|
305 |
-
reply_markup=InlineKeyboardMarkup(
|
306 |
-
[[
|
307 |
-
InlineKeyboardButton(
|
308 |
-
"View Channel",
|
309 |
-
url=f"https://t.me/c/{cid}/-1"
|
310 |
-
)
|
311 |
-
]]
|
312 |
-
)
|
313 |
)
|
|
|
292 |
)
|
293 |
elif isinstance(chat, Channel) and chat.broadcast:
|
294 |
await asyncio.sleep(2.5)
|
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:** {chat.date}\n"
|
309 |
f"**ID:** `{cid}`\n"
|
310 |
+
f"**Access hash:** `{chat.access_hash}`\n",
|
|
|
311 |
link_preview_options=LinkPreviewOptions(is_disabled=True),
|
312 |
+
reply_markup=InlineKeyboardMarkup(keyboard)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
)
|