|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import time |
|
import json |
|
import asyncio |
|
import io |
|
import os |
|
import re |
|
import logging |
|
|
|
from pyrogram import * |
|
from pyrogram.enums import ChatMemberStatus, ChatType |
|
from pyrogram import enums |
|
from pyrogram import Client, filters |
|
from pyrogram.types import * |
|
from pyrogram.errors import * |
|
|
|
START_TEXT = """ |
|
👋 **Hey {name}!** |
|
|
|
I’m excited to let you know that I’m ready to serve as your **Approve Join Request CAPTCHA Bot Developer**. |
|
|
|
✨ **What I Offer**: |
|
- **Approve Join Requests**: Automatically approve or reject join requests based on your settings. |
|
- **CAPTCHA Verification**: Add an extra layer of security with CAPTCHA challenges for new members. |
|
|
|
🔧 **How to Get Started**: |
|
1. Use the command `/settingmode` to configure your preferences. |
|
2. Customize the bot to suit your group’s needs. |
|
|
|
🚀 Let’s make your group safer and more efficient together! |
|
""" |
|
|
|
NOT_ALLOWED_NON_PROGRAMMER = [ |
|
5575183435, |
|
948247711, |
|
] |
|
|
|
@Client.on_message( |
|
~filters.scheduled |
|
& filters.command(["start"]) |
|
& filters.private |
|
& ~filters.forwarded |
|
) |
|
async def startbot(client: Client, message: Message): |
|
if message.from_user.id in NOT_ALLOWED_NON_PROGRAMMER: |
|
return |
|
buttons = InlineKeyboardMarkup( |
|
[ |
|
[ |
|
InlineKeyboardButton( |
|
text="Add your to group", |
|
url=f"https://t.me/{client.me.username}?startgroup=True" |
|
), |
|
], |
|
[ |
|
InlineKeyboardButton( |
|
text="Developer", |
|
url=f"https://t.me/xpushz" |
|
), |
|
InlineKeyboardButton( |
|
text="Channel", |
|
url='https://t.me/RendyProjects' |
|
) |
|
], |
|
] |
|
) |
|
await message.reply_text( |
|
text=START_TEXT.format(name=message.from_user.mention), |
|
disable_web_page_preview=True, |
|
reply_markup=buttons |
|
) |