randydev's picture
Update Detection/manager/start.py
8b01779 verified
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)