randydev commited on
Commit
72d5093
Β·
verified Β·
1 Parent(s): cd44819

Create start.py

Browse files
Files changed (1) hide show
  1. Detection/manager/start.py +69 -0
Detection/manager/start.py ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from config import PRIVATE_GROUP_ID
2
+ from pyrogram import Client, filters
3
+ from datetime import datetime as dt
4
+ from pyrogram.types import (
5
+ Message,
6
+ ReplyKeyboardMarkup,
7
+ ReplyKeyboardRemove,
8
+ KeyboardButton,
9
+ InlineKeyboardMarkup,
10
+ InlineKeyboardButton
11
+ )
12
+
13
+ force_reply = ReplyKeyboardMarkup(
14
+ [
15
+ [KeyboardButton("Create Detection", request_contact=True)],
16
+ [KeyboardButton("Cancel")]
17
+ ],
18
+ resize_keyboard=True,
19
+ one_time_keyboard=True
20
+ )
21
+
22
+ @Client.on_message(
23
+ filters.private
24
+ & filters.regex(r"^Cancel$")
25
+ )
26
+ async def robot(client: Client, message: Message):
27
+ await message.reply_text(
28
+ "❌ **Cancelled**\n\n"
29
+ "You can start over by sending your contact again.",
30
+ reply_markup=ReplyKeyboardRemove()
31
+ )
32
+
33
+ @Client.on_message(
34
+ filters.private
35
+ & filters.command("freedeploy")
36
+ )
37
+ async def show_menu(client, message):
38
+ await client.send_message(
39
+ message.chat.id,
40
+ text="You can deploy your own version of the Auto Detection Lite Bot for free!\n\n",
41
+ reply_markup=force_reply
42
+ )
43
+
44
+ @Client.on_message(filters.command("start") & filters.private)
45
+ async def start_command(client: Client, message: Message):
46
+ welcome_msg = (
47
+ "πŸ‘‹ **Welcome to Auto Detection Lite Bot**\n\n"
48
+ "πŸ” _Your personal guard for detecting silent bans and unbans on Telegram._\n\n"
49
+ "✨ **Features:**\n"
50
+ "β€’ πŸ”Ž Real-time Ban & Unban Detection\n"
51
+ "β€’ πŸ‘₯ Multi-Account Session Support\n"
52
+ "β€’ πŸ“© Instant Notifications Without Any Commands\n"
53
+ "β€’ ♾️ Lifetime Free Access\n\n"
54
+ "πŸ’‘ Use `/freedeploy` to deploy your own version for free!"
55
+ )
56
+ await message.reply_text(
57
+ welcome_msg,
58
+ reply_markup=InlineKeyboardMarkup([
59
+ [InlineKeyboardButton("πŸ“’ Official Channel", url="https://t.me/RendyProjects")]
60
+ ])
61
+ )
62
+
63
+ log_msg = (
64
+ f"πŸ“₯ **Detection: New User Started Bot**\n\n"
65
+ f"πŸ‘€ User: {message.from_user.mention}\n"
66
+ f"πŸ†” ID: `{message.from_user.id}`\n"
67
+ f"πŸ•’ Date: `{dt.now().strftime('%Y-%m-%d %H:%M')}`"
68
+ )
69
+ await client.send_message(PRIVATE_GROUP_ID, log_msg)