randydev commited on
Commit
eaec2e5
·
verified ·
1 Parent(s): d2e3b6c

Create start.py

Browse files
Files changed (1) hide show
  1. akn/ApproveBot/start.py +89 -0
akn/ApproveBot/start.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ # Copyright 2020-2024 (c) Randy W @xtdevs, @xtsea
4
+ #
5
+ # from : https://github.com/TeamKillerX
6
+ # Channel : @RendyProjects
7
+ # This program is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Affero General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Affero General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Affero General Public License
18
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+
20
+ import time
21
+ import json
22
+ import asyncio
23
+ import io
24
+ import os
25
+ import re
26
+ import logging
27
+
28
+ from pyrogram import *
29
+ from pyrogram.enums import ChatMemberStatus, ChatType
30
+ from pyrogram import enums
31
+ from pyrogram import Client, filters
32
+ from pyrogram.types import *
33
+ from pyrogram.errors import *
34
+
35
+ START_TEXT = """
36
+ 👋 **Hey {name}!**
37
+
38
+ I’m excited to let you know that I’m ready to serve as your **Approve Join Request CAPTCHA Bot Developer**.
39
+
40
+ ✨ **What I Offer**:
41
+ - **Approve Join Requests**: Automatically approve or reject join requests based on your settings.
42
+ - **CAPTCHA Verification**: Add an extra layer of security with CAPTCHA challenges for new members.
43
+
44
+ 🔧 **How to Get Started**:
45
+ 1. Use the command `/settingmode` to configure your preferences.
46
+ 2. Customize the bot to suit your group’s needs.
47
+
48
+ 🚀 Let’s make your group safer and more efficient together!
49
+ """
50
+
51
+ NOT_ALLOWED_NON_PROGRAMMER = [
52
+ 5575183435, #suku
53
+ 948247711, # akay
54
+ ]
55
+
56
+ @Client.on_message(
57
+ ~filters.scheduled
58
+ & filters.command(["start"])
59
+ & filters.private
60
+ & ~filters.forwarded
61
+ )
62
+ async def startbot(client: Client, message: Message):
63
+ if message.from_user.id in NOT_ALLOWED_NON_PROGRAMMER:
64
+ return
65
+ buttons = InlineKeyboardMarkup(
66
+ [
67
+ [
68
+ InlineKeyboardButton(
69
+ text="Add your to group",
70
+ url=f"https://t.me/{client.me.username}?startgroup=True"
71
+ ),
72
+ ],
73
+ [
74
+ InlineKeyboardButton(
75
+ text="Developer",
76
+ url=f"https://t.me/xpushz"
77
+ ),
78
+ InlineKeyboardButton(
79
+ text="Channel",
80
+ url='https://t.me/RendyProjects'
81
+ )
82
+ ],
83
+ ]
84
+ )
85
+ await message.reply_text(
86
+ text=START_TEXT.format(name=message.from_user.mention),
87
+ disable_web_page_preview=True,
88
+ reply_markup=buttons
89
+ )