|
from config import PRIVATE_GROUP_ID |
|
from pyrogram import Client, filters |
|
from datetime import datetime as dt |
|
from pyrogram.types import ( |
|
Message, |
|
ReplyKeyboardMarkup, |
|
ReplyKeyboardRemove, |
|
KeyboardButton, |
|
InlineKeyboardMarkup, |
|
InlineKeyboardButton |
|
) |
|
|
|
force_reply = ReplyKeyboardMarkup( |
|
[ |
|
[KeyboardButton("Create Detection", request_contact=True), KeyboardButton("Show Sessions")], |
|
[KeyboardButton("Start Sessions"), KeyboardButton("My Delete All")], |
|
[KeyboardButton("My Info")], |
|
[KeyboardButton("Cancel")] |
|
], |
|
resize_keyboard=True, |
|
one_time_keyboard=True |
|
) |
|
|
|
@Client.on_message( |
|
filters.private |
|
& filters.regex(r"^Cancel$") |
|
) |
|
async def robot(client: Client, message: Message): |
|
await message.reply_text( |
|
"β **Cancelled**\n\n" |
|
"You can start over by sending your contact again.", |
|
reply_markup=ReplyKeyboardRemove() |
|
) |
|
|
|
@Client.on_message( |
|
filters.private |
|
& filters.command("freedeploy") |
|
) |
|
async def show_menu(client, message): |
|
await client.send_message( |
|
message.chat.id, |
|
text="You can deploy your own version of the Auto Detection Lite Bot for free!\n\n", |
|
reply_markup=force_reply |
|
) |
|
|
|
@Client.on_message(filters.command("start") & filters.private) |
|
async def start_command(client: Client, message: Message): |
|
welcome_msg = ( |
|
"π **Welcome to Auto Detection Lite Bot**\n\n" |
|
"π _Your personal guard for detecting silent bans and unbans on Telegram._\n\n" |
|
"β¨ **Features:**\n" |
|
"β’ π Real-time Ban & Unban Detection\n" |
|
"β’ π₯ Multi-Account Session Support\n" |
|
"β’ π© Instant Notifications Without Any Commands\n" |
|
"β’ βΎοΈ Lifetime Free Access\n\n" |
|
"π‘ Use `/freedeploy` to deploy your own version for free!" |
|
) |
|
await message.reply_text( |
|
welcome_msg, |
|
reply_markup=InlineKeyboardMarkup([ |
|
[InlineKeyboardButton("π’ Official Channel", url="https://t.me/RendyProjects")] |
|
]) |
|
) |
|
|
|
log_msg = ( |
|
f"π₯ **Detection: New User Started Bot**\n\n" |
|
f"π€ User: {message.from_user.mention}\n" |
|
f"π ID: `{message.from_user.id}`\n" |
|
f"π Date: `{dt.now().strftime('%Y-%m-%d %H:%M')}`" |
|
) |
|
await client.send_message(PRIVATE_GROUP_ID, log_msg) |