uk
Feedback
I think

I think

Відкрити в Telegram

Hello Telegram, this channel does not violate the terms of service and is committed to not violating your terms of service. Please protect it from vandals. Thank you @Telegram and @B2_30

Показати більше
Ірак18 060Категорія не вказана
5 432
Підписники
-524 години
-1477 днів
-1 26730 днів
Архів дописів
I think
5 432
# Arabic Decorated 3 (Example: using a different combining character or simple stylistic change) decorated_names.append("اٰلْـٰمْـٰحْـٰمْـٰدْ ➌:\n" + "".join(f"{char}ْ" for char in name if char.isalpha()) + "".join(char for char in name if not char.isalpha())) # Arabic Decorated 4 (Example: using a different combining character or simple stylistic change) decorated_names.append("اٰلْـٰمْـٰحْـٰمْـٰدْ ➍:\n" + "".join(f"{char}ٓ" for char in name if char.isalpha()) + "".join(char for char in name if not char.isalpha())) # Arabic Decorated 5 (Example: using a different combining character or simple stylistic change) decorated_names.append("اٰلْـٰمْـٰحْـٰمْـٰدْ ➎:\n" + "".join(f"{char}ٌ" for char in name if char.isalpha()) + "".join(char for char in name if not char.isalpha())) return "\n\n".join(decorated_names) # --- URL Check Functions (from bot.py, adapted for python-telegram-bot) --- def check_url_virustotal(update: Update, context: CallbackContext, url_to_check: str, bot_username, user_id): chat_id = update.effective_chat.id if not url_to_check.startswith(('http://', 'https://')): send_message(context.bot, chat_id, "الرجاء إرسال رابط صحيح يبدأ بـ \"http\" أو \"https\". ❌") return try: url_id = base64.urlsafe_b64encode(url_to_check.encode()).decode().strip("=") response = requests.get( f"https://www.virustotal.com/api/v3/urls/{url_id}", headers={"x-apikey": VIRUSTOTAL_API_KEY} ) if response.status_code == 200: data = response.json() analysis_stats = data['data']['attributes']['last_analysis_stats'] result_message = ( f"📊 *نتائج فحص الرابط:*\n" f"✅ آمن: {analysis_stats['harmless']}\n" f"⚠️ مشبوه: {analysis_stats['malicious']}\n" f"❓ مشكوك فيه: {analysis_stats['suspicious']}" ) send_message(context.bot, chat_id, result_message, parse_mode=ParseMode.MARKDOWN) else: send_message(context.bot, chat_id, "❌ حدثت مشكلة في فحص الرابط، حاول مرة أخرى لاحقًا.") except Exception as e: send_message(context.bot, chat_id, f"❌ حصل خطأ غير متوقع: {e}") # --- Radio Stations Data --- SUDAN_RADIO_STATIONS = [ {"name": "#Radio Quran 🕋", "url": "https://n0a.radiojar.com/0tpy1h0kxtzuv?rj-ttl=5&rj-tok=AAABhdgGORQA-2acfyF3_4WY2g"}, {"name": "Abdulbasit Abdulsamad 🎙️", "url": "https://radio.mp3islam.com/listen/abdulbasit/radio.mp3"}, {"name": "Dabanga Radio 📻", "url": "https://stream.dabangasudan.org/"}, {"name": "Dial Radio 📡", "url": "https://cast.dialradio.live/stream.aac"} ] EGYPT_RADIO_STATIONS = [ {"name": "إذاعة مشاري العفاسي 🕌", "url": "https://qurango.net/radio/mishary_alafasi"}, {"name": "---تراتيل قصيرة متميزة--- ✨", "url": "https://qurango.net/radio/tarateel"}, {"name": ". beautiful recitation 🎶", "url": "https://qurango.net/radio/salma"}, {"name": ". القارئ محمد أيوب 🎤", "url": "https://qurango.net/radio/mohammed_ayyub"}, {"name": ".. مختصر التفسير 📚", "url": "https://qurango.net/radio/mukhtasartafsir"}, {"name": ".إذاعة ماهر المعيقلي 🕋", "url": "https://backup.qurango.net/radio/maher"}, {"name": "87.8 Mix FM 🎧", "url": "https://stream-29.zeno.fm/na3vpvn10qruv"}, {"name": "90s FM 📻", "url": "http://eu1.fastcast4u.com/proxy/prontofm"}, {"name": "90s FM 🎶", "url": "https://fastcast4u.com/player/prontofm/?pl=vlc&c=0"}, {"name": "92.7 Mega FM 🔊", "url": "http://nebula.shoutca.st:8211/mp3"}, {"name": "Abdulbasit Abdulsamad 🎙️", "url": "https://radio.mp3islam.com/listen/abdulbasit/radio.mp3"}, {"name": "Abdulrasheet Soufi 🎤", "url": "https://qurango.net/radio/abdulrasheed_soufi_assosi.mp3"},

I think
5 432
في اختراع اسمه ملف py

I think
5 432
# Monospace monospace_map = { 'A': '𝙰', 'B': '𝙱', 'C': '𝙲', 'D': '𝙳', 'E': '𝙴', 'F': '𝙵', 'G': '𝙶', 'H': '𝙷', 'I': '𝙸', 'J': '𝙹', 'K': '𝙺', 'L': '𝙻', 'M': '𝙼', 'N': '𝙽', 'O': '𝙾', 'P': '𝙿', 'Q': '𝚀', 'R': '𝚁', 'S': '𝚂', 'T': '𝚃', 'U': '𝚄', 'V': '𝚅', 'W': '𝚆', 'X': '𝚇', 'Y': '𝚈', 'Z': '𝚉', 'a': '𝚊', 'b': '𝚋', 'c': '𝚌', 'd': '𝚍', 'e': '𝚎', 'f': '𝚏', 'g': '𝚐', 'h': '𝚑', 'i': '𝚒', 'j': '𝚓', 'k': '𝚔', 'l': '𝚕', 'm': '𝚖', 'n': '𝚗', 'o': '𝚘', 'p': '𝚙', 'q': '𝚚', 'r': '𝚛', 's': '𝚜', 't': '𝚝', 'u': '𝚞', 'v': '𝚟', 'w': '𝚠', 'x': '𝚡', 'y': '𝚢', 'z': '𝚣' } decorated_names.append("𝙰𝙻𝙼𝙴𝚀𝙽𝙷𝚁𝙴𝙵 ➋:\n" + "".join(monospace_map.get(char, char) for char in name)) # Circled circled_map = { 'A': 'Ⓐ', 'B': 'Ⓑ', 'C': 'Ⓒ', 'D': 'Ⓓ', 'E': 'Ⓔ', 'F': 'Ⓕ', 'G': 'Ⓖ', 'H': 'Ⓗ', 'I': 'Ⓘ', 'J': 'Ⓙ', 'K': 'Ⓚ', 'L': 'Ⓛ', 'M': 'Ⓜ', 'N': 'Ⓝ', 'O': 'Ⓞ', 'P': 'Ⓟ', 'Q': 'Ⓠ', 'R': 'Ⓡ', 'S': 'Ⓢ', 'T': 'Ⓣ', 'U': 'Ⓤ', 'V': 'Ⓥ', 'W': 'Ⓦ', 'X': 'Ⓧ', 'Y': 'Ⓨ', 'Z': 'Ⓩ', 'a': 'ⓐ', 'b': 'ⓑ', 'c': 'ⓒ', 'd': 'ⓓ', 'e': 'ⓔ', 'f': 'ⓕ', 'g': 'ⓖ', 'h': 'ⓗ', 'i': 'ⓘ', 'j': 'ⓙ', 'k': 'ⓚ', 'l': 'ⓛ', 'm': 'ⓜ', 'n': 'ⓝ', 'o': 'ⓞ', 'p': 'ⓟ', 'q': 'ⓠ', 'r': 'ⓡ', 's': 'ⓢ', 't': 'ⓣ', 'u': 'ⓤ', 'v': 'ⓥ', 'w': 'ⓦ', 'x': 'ⓧ', 'y': 'ⓨ', 'z': 'ⓩ' } decorated_names.append("Ⓐ🄻ⓂⒺ🄀ⓃⒽⓇ💺🄵 ➌:\n" + "".join(circled_map.get(char, char) for char in name)) # Double Struck double_struck_map = { 'A': '𝔸', 'B': '𝔹', 'C': 'ℂ', 'D': '𝔻', 'E': '𝔼', 'F': '𝔽', 'G': '𝔾', 'H': 'ℍ', 'I': '𝕀', 'J': '𝕁', 'K': '𝕂', 'L': '𝕃', 'M': '𝕄', 'N': 'ℕ', 'O': '𝕆', 'P': 'ℙ', 'Q': 'ℚ', 'R': 'ℝ', 'S': '𝕊', 'T': '𝕋', 'U': '𝕌', 'V': '𝕍', 'W': '𝕎', 'X': '𝕏', 'Y': '𝕐', 'Z': 'ℤ', 'a': '𝕒', 'b': '𝕓', 'c': '𝕔', 'd': '𝕕', 'e': '𝕖', 'f': '𝕗', 'g': '𝕘', 'h': '𝕙', 'i': '𝕚', 'j': '𝕛', 'k': '𝕜', 'l': '𝕝', 'm': '𝕞', 'n': '𝕟', 'o': '𝕠', 'p': '𝕡', 'q': '𝕢', 'r': '𝕣', 's': '𝕤', 't': '𝕥', 'u': '𝕦', 'v': '𝕧', 'w': '𝕨', 'x': '𝕩', 'y': '𝕪', 'z': '𝕫' } decorated_names.append("𝔸🄻𝕄𝔼🄀ℕℍℝ𝔼🔠 ➍:\n" + "".join(double_struck_map.get(char, char) for char in name)) # Squared squared_map = { 'A': '🄰', 'B': '🄱', 'C': '🄲', 'D': '🄳', 'E': '🄴', 'F': '🄵', 'G': '🄶', 'H': '🄷', 'I': '🄸', 'J': '🄹', 'K': '🄺', 'L': '🄻', 'M': '🄼', 'N': '🄽', 'O': '🄾', 'P': '🄿', 'Q': '🅀', 'R': '🅁', 'S': '🅂', 'T': '🅃', 'U': '🅄', 'V': '🅅', 'W': '🅆', 'X': '🅇', 'Y': '🅈', 'Z': '🅉', 'a': '🄰', 'b': '🄱', 'c': '🄲', 'd': '🄳', 'e': '🄴', 'f': '🄵', 'g': '🄶', 'h': '🄷', 'i': '🄸', 'j': '🄹', 'k': '🄺', 'l': '🄻', 'm': '🄼', 'n': '🄽', 'o': '🄾', 'p': '🄿', 'q': '🅀', 'r': '🅁', 's': '🅂', 't': '🅃', 'u': '🅄', 'v': '🅅', 'w': '🅆', 'x': '🅇', 'y': '🅈', 'z': '🅉' } decorated_names.append("🄰🄻🄼🄴🄀🄽🄷🅁🄴🄵 ➎:\n" + "".join(squared_map.get(char, char) for char in name)) return "\n\n".join(decorated_names) def decorate_arabic_name(name): decorated_names = [] # Arabic Decorated 1 (Example: using combining characters for a "double" effect) # This is a simplified example. Real Arabic decoration is complex and often requires specific fonts/libraries. # For demonstration, we'll use a basic approach. decorated_names.append("اٰلْـٰمْـٰحْـٰمْـٰدْ ➊:\n" + "".join(f"{char}ٰ" for char in name if char.isalpha()) + "".join(char for char in name if not char.isalpha())) # Arabic Decorated 2 (Example: using a different combining character or simple stylistic change) decorated_names.append("اٰلْـٰمْـٰحْـٰمْـٰدْ ➋:\n" + "".join(f"{char}ّ" for char in name if char.isalpha()) + "".join(char for char in name if not char.isalpha()))

I think
5 432
elif 'url' in json_response: return json_response['url'] else: logging.warning(f"استجابة API الصورة لم تحتوي على مفتاح URL المتوقع: {json_response}") return None except json.JSONDecodeError: logging.error(f"استجابة API الصورة ليست JSON صالحة: {response.text}") return None except requests.exceptions.RequestException as e: logging.error(f"خطأ في إنشاء الصورة عبر API {api_url}: {e}") return None def convert_text_to_speech_via_api(text, bot_username, user_id): """ يحول النص إلى صوت باستخدام API مخصص، ويستخرج رابط الصوت من استجابة JSON. """ encoded_text = urllib.parse.quote(text) api_url = f"{API_TEXT_TO_SPEECH}?text={encoded_text}&voice=nova&style=cheerful+tone" if not check_api_status(api_url): logging.error(f"خطأ في تحويل النص إلى صوت عبر API {api_url}") return None try: response = requests.get(api_url, timeout=15) response.raise_for_status() try: json_response = response.json() if 'voice' in json_response: return json_response['voice'] elif 'url' in json_response: # Some APIs might return 'url' return json_response['url'] else: logging.warning(f"استجابة API تحويل النص إلى صوت لم تحتوي على مفتاح 'voice' أو 'url': {json_response}") return None except json.JSONDecodeError: logging.error(f"استجابة API تحويل النص إلى صوت ليست JSON صالحة: {response.text}") return None except requests.exceptions.RequestException as e: logging.error(f"خطأ في تحويل النص إلى صوت عبر API: {e}") return None def get_azkar_via_api(bot_username, user_id): """ يجلب الأذكار من API الأذكار الإسلامية. """ if not check_api_status(API_AZKAR): logging.error(f"خطأ في جلب الأذكار عبر API {API_AZKAR}") return "عذرًا، خدمة الأذكار غير متاحة حاليًا. 😔" try: response = requests.get(API_AZKAR, timeout=10) response.raise_for_status() try: json_response = response.json() if 'zekr' in json_response: zekr_text = ( f"*{json_response['zekr']}*\n\n" f"الوقت: {json_response.get('time', 'غير متاح')}\n" f"التاريخ: {json_response.get('date', 'غير متاح')}\n" f"نوع الذكر: {json_response.get('type', 'غير متاح')}" ) return clean_api_response(zekr_text) else: return clean_api_response(json.dumps(json_response, ensure_ascii=False)) except json.JSONDecodeError: logging.error(f"استجابة API الأذكار ليست JSON صالحة: {response.text}") return "عذرًا، حدث خطأ أثناء جلب الأذكار. 😔" except requests.exceptions.RequestException as e: logging.error(f"خطأ في جلب الأذكار عبر API: {e}") return "عذرًا، حدث خطأ أثناء جلب الأذكار. 😔" # --- Name Decoration Functions --- def decorate_english_name(name): decorated_names = [] # Bold Italic bold_italic_map = { 'A': '𝑨', 'B': '𝑩', 'C': '𝑪', 'D': '𝑫', 'E': '𝑬', 'F': '𝑭', 'G': '𝑮', 'H': '𝑯', 'I': '𝑰', 'J': '𝑱', 'K': '𝑲', 'L': '𝑳', 'M': '𝑴', 'N': '𝑵', 'O': '𝑶', 'P': '𝑷', 'Q': '𝑸', 'R': '𝑹', 'S': '𝑺', 'T': '𝑻', 'U': '𝑼', 'V': '𝑽', 'W': '𝑾', 'X': '𝑿', 'Y': '𝒀', 'Z': '𝒁', 'a': '𝒂', 'b': '𝒃', 'c': '𝒄', 'd': '𝒅', 'e': '𝒆', 'f': '𝒇', 'g': '𝒈', 'h': '𝒉', 'i': '𝒊', 'j': '𝒋', 'k': '𝒌', 'l': '𝒍', 'm': '𝒎', 'n': '𝒏', 'o': '𝒐', 'p': '𝒑', 'q': '𝒒', 'r': '𝒓', 's': '𝒔', 't': '𝒕', 'u': '𝒖', 'v': '𝒗', 'w': '𝒘', 'x': '𝒙', 'y': '𝒚', 'z': '𝒛' } decorated_names.append("𝑨𝑳𝑴𝑬𝑼𝑵𝑯𝑹𝑬𝑭 ➊:\n" + "".join(bold_italic_map.get(char, char) for char in name))

I think
5 432
def check_api_status(api_url, params=None): """يتحقق مما إذا كان الـ API يعمل.""" try: response = requests.head(api_url, params=params, timeout=5) response.raise_for_status() return True except requests.exceptions.RequestException as e: logging.error(f"فشل التحقق من API لـ {api_url}: {e}") return False def interact_with_ai_api(prompt, api_type, bot_username, user_id): """ يتفاعل مع APIs الذكاء الاصطناعي بناءً على نوع الطلب. يستخدم APIs بديلة في حال فشل الأساسي. """ apis_to_try = [] if api_type == "ai": apis_to_try = [ (API_AI_PRIMARY, {"q": prompt}), (API_CHATGPT_3_5, {"ai": prompt}), (API_DEEPSEEK_AI, {"q": prompt}), (API_SHEREEN_AI, {"q": prompt}), (API_AI_FALLBACK_1, {"gpt-5-mini": prompt}), (API_AI_FALLBACK_2, {"WR1": prompt}), (API_AI_FALLBACK_3, {"text": prompt}), ] elif api_type == "dream_interpret": apis_to_try = [ (API_AI_PRIMARY, {"q": f"تفسير الحلم: {prompt}"}), (API_CHATGPT_3_5, {"ai": f"تفسير الحلم: {prompt}"}), (API_DEEPSEEK_AI, {"q": f"تفسير الحلم: {prompt}"}), (API_SHEREEN_AI, {"q": f"تفسير الحلم: {prompt}"}), (API_AI_FALLBACK_1, {"gpt-5-mini": f"تفسير الحلم: {prompt}"}), (API_AI_FALLBACK_2, {"WR1": f"تفسير الحلم: {prompt}"}), (API_AI_FALLBACK_3, {"text": f"تفسير الحلم: {prompt}"}), ] elif api_type == "blue_genie_game": apis_to_try = [ (API_AI_PRIMARY, {"q": f"لعبة المارد الأزرق: {prompt}"}), (API_CHATGPT_3_5, {"ai": f"لعبة المارد الأزرق: {prompt}"}), (API_DEEPSEEK_AI, {"q": f"لعبة المارد الأزرق: {prompt}"}), (API_SHEREEN_AI, {"q": f"لعبة المارد الأزرق: {prompt}"}), (API_AI_FALLBACK_1, {"gpt-5-mini": f"لعبة المارد الأزرق: {prompt}"}), (API_AI_FALLBACK_2, {"WR1": f"لعبة المارد الأزرق: {prompt}"}), (API_AI_FALLBACK_3, {"text": prompt}), ] for api_url, params in apis_to_try: try: response = requests.get(api_url, params=params, timeout=10) response.raise_for_status() try: json_response = response.json() result = None if 'response' in json_response: result = json_response['response'] elif 'answer' in json_response: result = json_response['answer'] elif 'result' in json_response: result = json_response['result'] elif 'text' in json_response: result = json.dumps(json_response, ensure_ascii=False) elif 'output' in json_response: result = json_response['output'] return clean_api_response(result) except json.JSONDecodeError: return clean_api_response(response.text.strip()) except requests.exceptions.RequestException as e: logging.error(f"خطأ في التفاعل مع API {api_url}: {e}") continue return "عذرًا، حدث خطأ أثناء معالجة طلبك. يرجى المحاولة مرة أخرى لاحقًا. 😔" def generate_image_via_api(prompt, bot_username, user_id): """ ينشئ صورة باستخدام API مخصص لإنشاء الصور. """ api_url = API_IMAGE_GENERATION_NEW params = {"text": prompt} if not check_api_status(api_url, params): logging.error(f"خطأ في إنشاء الصورة عبر API {api_url}") return None try: response = requests.get(api_url, params=params, timeout=15) response.raise_for_status() try: json_response = response.json() if 'image_url' in json_response: return json_response['image_url']

I think
5 432
username = ''.join(random.choice(chars) for _ in range(4)) elif username_type == "semi_quad": parts = [random.choice(chars) for _ in range(3)] username = f"{parts[0]}{parts[1]}_{parts[2]}" if random.choice([True, False]) else f"{parts[0]}_{parts[1]}{parts[2]}" elif username_type == "semi_triple": parts = [random.choice(chars) for _ in range(2)] username = f"{parts[0]}_{parts[1]}" elif username_type == "random": length = random.randint(4, 8) username = ''.join(random.choice(chars) for _ in range(length)) elif username_type == "unique": patterns = [ lambda: ''.join(random.choice(string.ascii_lowercase) for _ in range(4)), lambda: ''.join(random.choice(string.digits) for _ in range(4)), lambda: random.choice(string.ascii_lowercase) * 3 + random.choice(string.digits), lambda: random.choice(string.ascii_lowercase) + random.choice(string.digits) * 3, lambda: random.choice(string.ascii_lowercase) + random.choice(string.ascii_lowercase) + random.choice(string.digits) + random.choice(string.digits), lambda: random.choice(string.ascii_lowercase) + random.choice(string.digits) + random.choice(string.ascii_lowercase) + random.choice(string.digits), ] username = random.choice(patterns)() if check_username_availability(bot_token, username): return username time.sleep(0.1) return None def telegram_usernames_menu(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id current_bot_username = get_bot_username_from_token(context.bot.token) bot_type = get_bot_type(current_bot_username) keyboard = [ [InlineKeyboardButton("يوزر نوع واحد 🅰️", callback_data="get_username_single_type")], [InlineKeyboardButton("يوزرات رباعية 🔢", callback_data="get_username_quad_usernames")], [InlineKeyboardButton("شبه رباعي 🔠", callback_data="get_username_semi_quad")], [InlineKeyboardButton("يوزرات شبه ثلاثية 🔡", callback_data="get_username_semi_triple")], [InlineKeyboardButton("عشوائي 🎲", callback_data="get_username_random")], [InlineKeyboardButton("فريد ✨", callback_data="get_username_unique")], [InlineKeyboardButton("رجوع 🔙", callback_data="back_to_main_user_menu")] ] edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "اختر نوع اليوزر الذي تبحث عنه: 👇", reply_markup=InlineKeyboardMarkup(keyboard)) def handle_username_type_selection(update: Update, context: CallbackContext): query = update.callback_query user_id = query.from_user.id current_bot_token = context.bot.token current_bot_username = get_bot_username_from_token(current_bot_token) bot_type = get_bot_type(current_bot_username) query.answer("جاري البحث عن يوزرات متاحة... ⏳", show_alert=True) chat_id = query.message.chat.id username_type = query.data.replace("get_username_", "") found_usernames = [] for i in range(5): username = generate_and_check_username(current_bot_token, username_type) if username: found_usernames.append(username) else: if i == 0 and not found_usernames: send_message(context.bot, chat_id, "لم يتم العثور على يوزرات متاحة حاليًا لهذا النوع. حاول مرة أخرى لاحقًا. 😔") return break if found_usernames: response_message = "✅ تم العثور على اليوزرات التالية:\n\n" for username in found_usernames: response_message += f"✨ @{username}\n" send_message(context.bot, chat_id, response_message) else: send_message(context.bot, chat_id, "لم يتم العثور على يوزرات متاحة حاليًا لهذا النوع. حاول مرة أخرى لاحقًا. 😔")

I think
5 432
# Send user keyboard as well for admin if bot_type == "encryption_bot": user_name = update.effective_user.first_name user_username = update.effective_user.username if update.effective_user.username else "غير متاح" welcome_message = ( f"مرحباً {user_name}! 👋\n" f"يوزر: @{user_username}\n" f"ايدي: {user_id}\n\n" f"تم مرحبا بك في عالم فك/التشفير 🔐 ✅" ) send_message(context.bot, chat_id, welcome_message, reply_markup=get_user_keyboard(admin_id, current_bot_username, user_id, bot_type)) elif bot_type == "factory_bot": send_message(context.bot, chat_id, "👋 حياك الله في بوت صانع البوتات اختر نوع البوت الذي تريد انشاءه 🎩", reply_markup=get_user_keyboard(admin_id, current_bot_username, user_id, bot_type)) else: # hack_bot send_message(context.bot, chat_id, bot_settings["start_message"], parse_mode=ParseMode.MARKDOWN, reply_markup=get_user_keyboard(admin_id, current_bot_username, user_id, bot_type)) else: if bot_type == "encryption_bot": user_name = update.effective_user.first_name user_username = update.effective_user.username if update.effective_user.username else "غير متاح" welcome_message = ( f"مرحباً {user_name}! 👋\n" f"يوزر: @{user_username}\n" f"ايدي: {user_id}\n\n" f"تم مرحبا بك في عالم فك/التشفير 🔐 ✅" ) send_message(context.bot, chat_id, welcome_message, reply_markup=get_user_keyboard(admin_id, current_bot_username, user_id, bot_type)) elif bot_type == "factory_bot": send_message(context.bot, chat_id, "👋 حياك الله في بوت صانع البوتات اختر نوع البوت الذي تريد انشاءه 🎩", reply_markup=get_user_keyboard(admin_id, current_bot_username, user_id, bot_type)) else: # hack_bot send_message(context.bot, chat_id, bot_settings["start_message"], parse_mode=ParseMode.MARKDOWN, reply_markup=get_user_keyboard(admin_id, current_bot_username, user_id, bot_type)) def check_username_availability(bot_token, username): """ يتحقق مما إذا كان اسم المستخدم متاحًا على Telegram. يعيد True إذا كان متاحًا (لا يوجد مستخدم/قناة/مجموعة بهذا الاسم)، False إذا كان غير متاح. """ try: resp = requests.get(f"https://api.telegram.org/bot{bot_token}/getChat?chat_id=@{username}").json() if resp.get("ok"): return False elif resp.get("error_code") == 400 and "chat not found" in resp.get("description", "").lower(): return True else: logging.warning(f"استجابة غير متوقعة للتحقق من اسم المستخدم {username}: {resp}") return False except Exception as e: logging.error(f"خطأ في التحقق من توفر اسم المستخدم لـ @{username}: {e}") return False def generate_and_check_username(bot_token, username_type): """ ينشئ اسم مستخدم بناءً على النوع المحدد ويتحقق من توفره. يعيد اسم المستخدم إذا كان متاحًا، وإلا يعيد None. """ chars = string.ascii_lowercase + string.digits for _ in range(50): username = "" if username_type == "single_type": if random.choice([True, False]): char = random.choice(string.ascii_lowercase) username = char * 4 else: for _ in range(4): username += random.choice(string.ascii_lowercase + string.digits) elif username_type == "quad_usernames":

I think
5 432
made_bot_data[current_bot_username]["referred_users"].append(user_id) save_made_bot_settings(current_bot_username) new_user_name = update.effective_user.first_name send_message(context.bot, referrer_id, f"✅ تم احتساب نقطة بنجاح من دخول المستخدم {new_user_name} إلى رابطك. نقاطك الحالية: {made_bot_data[current_bot_username]['points'][referrer_id]} 🌟") logging.info(f"User {user_id} referred by {referrer_id}. Points for {referrer_id}: {made_bot_data[current_bot_username]['points'][referrer_id]}") else: send_message(context.bot, chat_id, "لم يتم احتساب النقاط لأنك قمت بالدخول عبر رابط إحالة من قبل. ℹ️") else: send_message(context.bot, chat_id, "لا يمكنك احتساب نقاط لنفسك. 😅") except ValueError: logging.warning(f"تم استلام معرف محيل غير صالح: {context.args[0]}") # التحقق من الاشتراك الإجباري (القنوات الخاصة بالبوت المصنوع) required_channels = bot_settings["channels"] # إزالة قناة المصنع الأساسية من هذا الفحص إذا كانت موجودة، لأنها تم فحصها بالفعل if FACTORY_MAIN_SUBSCRIPTION_CHANNEL in required_channels: required_channels = [c for c in required_channels if c != FACTORY_MAIN_SUBSCRIPTION_CHANNEL] if required_channels: not_subscribed_channels = [] for channel in required_channels: if not check_subscription(user_id, [channel], current_bot_token): not_subscribed_channels.append(channel) if not_subscribed_channels: message_text = "🚀🎨 مرحباً بك في عالم إنشاء وإدارة الأندكسات🎨🚀\n\n📌 تنبيه: الاشتراك الإجباري 📌\n\n🔐 لضمان أفضل تجربة واستخدام كامل لميزات البوت، يُرجى الاشتراك في القنوات التالية:\n\n🌟📈 استعد للانطلاق في رحلة تفاعلية مذهلة! 📈🌟\n\n" keyboard = [] for channel in not_subscribed_channels: channel_name = get_channel_name(channel, current_bot_token) clean_channel = channel.lstrip('@') keyboard.append([InlineKeyboardButton(f"اشترك في {channel_name}", url=f"https://t.me/{clean_channel}")]) message_text += f"{channel_name}\n" message_text += "\n📢 بعد إتمام الاشتراك، قم بإرسال رسالة \"/start\" للمتابعة واستغلال جميع خدمات البوت.\n\n💬 نتمنى لك تجربة رائعة ومليئة بالتفاعل! 💬" send_message(context.bot, chat_id, message_text, reply_markup=InlineKeyboardMarkup(keyboard)) return # تسجيل المستخدم الجديد (بعد التحقق من الاشتراك الإجباري) members = bot_settings["members"] if user_id not in members: members.append(user_id) bot_settings["members"] = members # Update in settings dict save_made_bot_settings(current_bot_username) # Save updated members if bot_settings["notifications"] == "on" and user_id != admin_id: user_name = update.effective_user.first_name username = update.effective_user.username member_count = len(members) send_message(context.bot, admin_id, f"🔔 *تنبيه: مستخدم جديد انضم إلى البوت الخاص بك!* 🎉\n👨‍💼¦ اسمه » ️ [{user_name}]\n🔱¦ معرفه » ️[@{username}]\n💳¦ ايديه » ️ [{user_id}]\n📊 *عدد الأعضاء الكلي:* {member_count}", parse_mode=ParseMode.MARKDOWN) if user_id == admin_id: send_message(context.bot, chat_id, "مرحبًا! إليك أوامرك: ⚡📮\n\n1. إدارة المشترڪين والتحكم بهم. 👥\n2. إرسال إذاعات ورسائل موجهة. 📢\n3. ضبط إعدادات الاشتراك الإجباري. 💢\n4. تفعيل أو تعطيل التنبيهات. ✔️❎\n5. إدارة حالة البوت ووضع الاشتراك. 💰🆓", reply_markup=get_admin_keyboard(current_bot_username, user_id, bot_type))

I think
5 432
send_message(context.bot, chat_id, msg, reply_markup=InlineKeyboardMarkup(keyboard)) # تخزين حالة المستخدم بأنه ينتظر الاشتراك في قناة المصنع الأساسية bot_user_states[current_bot_username][user_id] = {"awaiting_factory_main_subscription": True} return # إذا كان المستخدم قد أكمل الاشتراك في قناة المصنع الأساسية (إذا كانت مفعلة) # أو إذا لم تكن مفعلة، نتحقق من قنوات البوت المصنوع # وإذا كان المستخدم في حالة انتظار الاشتراك في قناة المصنع الأساسية، نقوم بإزالة هذه الحالة if isinstance(bot_user_states[current_bot_username].get(user_id), dict) and bot_user_states[current_bot_username][user_id].get("awaiting_factory_main_subscription"): bot_user_states[current_bot_username][user_id] = None # إزالة حالة الانتظار # Handle referral link (only for hack_bot) if bot_type == "hack_bot" and context.args and len(context.args) == 1: referrer_id = context.args[0] try: referrer_id = int(referrer_id) if referrer_id != user_id: # User cannot refer themselves # التحقق من الاشتراك في جميع القنوات المطلوبة قبل احتساب النقطة # بما في ذلك قناة المصنع الأساسية إذا كانت مفعلة all_required_channels = list(set(bot_settings["channels"] + ([FACTORY_MAIN_SUBSCRIPTION_CHANNEL] if FACTORY_MAIN_SUBSCRIPTION_ENABLED else []))) not_subscribed_channels = [] for channel in all_required_channels: # استخدام توكن المصنع الأساسي للتحقق من قناة المصنع الأساسية if channel == FACTORY_MAIN_SUBSCRIPTION_CHANNEL: if not check_subscription(user_id, [channel], MAIN_BOT_TOKEN): not_subscribed_channels.append(channel) else: if not check_subscription(user_id, [channel], current_bot_token): not_subscribed_channels.append(channel) if not_subscribed_channels: message_text = "🚀🎨 مرحباً بك في عالم إنشاء وإدارة الأندكسات🎨🚀\n\n📌 تنبيه: الاشتراك الإجباري 📌\n\n🔐 لضمان أفضل تجربة واستخدام كامل لميزات البوت، يُرجى الاشتراك في القنوات التالية:\n\n🌟📈 استعد للانطلاق في رحلة تفاعلية مذهلة! 📈🌟\n\n" keyboard = [] for channel in not_subscribed_channels: channel_name = get_channel_name(channel, current_bot_token) clean_channel = channel.lstrip('@') keyboard.append([InlineKeyboardButton(f"اشترك في {channel_name}", url=f"https://t.me/{clean_channel}")]) message_text += f"{channel_name}\n" message_text += "\n📢 بعد إتمام الاشتراك، قم بإرسال رسالة \"/start\" للمتابعة واستغلال جميع خدمات البوت.\n\n💬 نتمنى لك تجربة رائعة ومليئة بالتفاعل! 💬" send_message(context.bot, chat_id, message_text, reply_markup=InlineKeyboardMarkup(keyboard)) bot_user_states[current_bot_username][user_id] = {"awaiting_subscription_for_referral": referrer_id} return else: # إذا كان المستخدم مشتركًا بالفعل أو أكمل الاشتراك، يتم احتساب النقطة load_made_bot_settings(current_bot_username) if not isinstance(made_bot_data[current_bot_username].get("points"), dict): made_bot_data[current_bot_username]["points"] = {} # تحقق مما إذا كان المستخدم قد أحيل بالفعل if user_id not in made_bot_data[current_bot_username]["referred_users"]: made_bot_data[current_bot_username]["points"][referrer_id] = made_bot_data[current_bot_username]["points"].get(referrer_id, 0) + 1

I think
5 432
def decrypt_data(data: bytes, enc_type: str) -> bytes: if enc_type == "base64": try: return base64.b64decode(data) except Exception: return b"Error: Invalid Base64 data" elif enc_type == "hex": try: return bytes.fromhex(data.decode('utf-8')) except Exception: return b"Error: Invalid Hex data" elif enc_type == "rot13": try: return codecs.decode(data.decode('utf-8', errors='ignore'), 'rot13').encode('utf-8') except Exception: return b"Error: Invalid ROT13 data" elif enc_type == "sha256": return b"SHA256 is a one-way hash, cannot be decrypted." elif enc_type == "gzip": import zlib try: return zlib.decompress(data) except Exception: return b"Error: Invalid Gzip data" elif enc_type == "reverse": return data[::-1] return b"Error: Unknown decryption type" def start_made_bot(update: Update, context: CallbackContext): user_id = update.effective_user.id chat_id = update.effective_chat.id current_bot_token = context.bot.token current_bot_username = get_bot_username_from_token(current_bot_token) if not current_bot_username: logging.error(f"لم يتمكن من الحصول على اسم المستخدم للبوت بالتوكن {current_bot_token}. لا يمكن المتابعة.") send_message(context.bot, chat_id, "حدث خطأ في تحديد هوية البوت. يرجى المحاولة لاحقًا.") return admin_id = get_bot_admin_id(current_bot_username) bot_type = get_bot_type(current_bot_username) # تحميل بيانات البوت load_made_bot_settings(current_bot_username) bot_settings = made_bot_data.get(current_bot_username, DEFAULT_BOT_SETTINGS) # تهيئة حالة المستخدم إذا لم تكن موجودة if current_bot_username not in bot_user_states: bot_user_states[current_bot_username] = {} if user_id not in bot_user_states[current_bot_username]: bot_user_states[current_bot_username][user_id] = None # Reset state on /start # تحديث وقت آخر تفاعل if current_bot_username not in user_last_interaction_time: user_last_interaction_time[current_bot_username] = {} user_last_interaction_time[current_bot_username][user_id] = time.time() # التحقق من الحظر if user_id in bot_settings["banned_users"]: send_message(context.bot, chat_id, "أنت محظور من قبل المطور لا يمكنك استخدام البوت📛") return # التحقق من حالة البوت (مفتوح/مغلق) if bot_settings["bot_status"] == "off" and user_id != admin_id: send_message(context.bot, chat_id, "البوت متوقف حاليا لأغراض خاصة 🚨🚧") return # التحقق من وضع المدفوع if bot_settings["payment_status"] == "on" and user_id not in bot_settings["paid_users"] and user_id != admin_id: send_message(context.bot, chat_id, "مرحبًا بكم! 🌟\n\nللاستفادة الكاملة من جميع ميزات وخدمات بوتنا المتقدمة، يُرجى تفعيل البوت من خلال شراء الاشتراك. ⚙️✨\n\nنحن نعمل بجد لضمان تقديم تجربة فريدة ومميزة لكم. 🚀\n\nشكراً لثقتكم بنا. 😊", reply_markup=InlineKeyboardMarkup([ [InlineKeyboardButton("شراء الاشتراك", url=f"tg://user?id={admin_id}")] ])) return # NEW: التحقق من الاشتراك الإجباري لقناة المصنع الأساسية (إذا كانت مفعلة) # هذا التحقق يتم دائمًا بواسطة توكن البوت الرئيسي لضمان الصلاحية if FACTORY_MAIN_SUBSCRIPTION_ENABLED: if not check_subscription(user_id, [FACTORY_MAIN_SUBSCRIPTION_CHANNEL], MAIN_BOT_TOKEN): msg = f"❌ يجب عليك الاشتراك في القناة الأساسية {FACTORY_MAIN_SUBSCRIPTION_CHANNEL} لاستخدام هذا البوت.\n" keyboard = [[InlineKeyboardButton("اشترك في القناة", url=f"https://t.me/{FACTORY_MAIN_SUBSCRIPTION_CHANNEL.lstrip('@')}")]]

I think
5 432
[InlineKeyboardButton("اختراق بث الراديو 📻", callback_data="user_button_radio_hack"), InlineKeyboardButton("فحص الروابط 🖌️", callback_data="user_button_link_check")], [InlineKeyboardButton("زخرفة الأسماء 🗿", callback_data="user_button_name_decorate")], [InlineKeyboardButton("صيد يوزرات تليجرام 💍", callback_data="telegram_usernames_menu")], [InlineKeyboardButton("تواصل مع المطور 👨‍🎓", url=f"tg://user?id={admin_id}")] ] # Add custom buttons if enabled by admin if bot_settings.get("custom_buttons_enabled_by_admin", False): for btn in bot_settings["custom_buttons"]: if btn["type"] == "external_link": keyboard.append([InlineKeyboardButton(btn["name"], url=btn["value"])]) elif btn["type"] == "internal_link": keyboard.append([InlineKeyboardButton(btn["name"], url=btn["value"])]) elif btn["type"] == "send_message": keyboard.append([InlineKeyboardButton(btn["name"], callback_data=f"custom_msg_btn_{btn['name']}")]) elif bot_type == "encryption_bot": keyboard = [ [InlineKeyboardButton("✥تشفير ملفات🔒", callback_data="encrypt_file")], [InlineKeyboardButton("✥فك تشفير ملفات🔓", callback_data="decrypt_file")], [InlineKeyboardButton("✥الدعم🚨", url=f"tg://user?id={admin_id}")], [InlineKeyboardButton("✥الشروط و المتطلبات📜", callback_data="show_terms_encryption_bot")] ] if bot_settings.get("main_channel_link"): keyboard.append([InlineKeyboardButton("✥القناة الأساسية🫅", url=bot_settings["main_channel_link"])]) else: keyboard.append([InlineKeyboardButton("✥القناة الأساسية🫅", callback_data="no_main_channel_set")]) elif bot_type == "factory_bot": # User keyboard for the new factory bot keyboard = [ [InlineKeyboardButton("💻 بوت اختراق", callback_data="create_hack_bot_sub")], [InlineKeyboardButton("🔐 بوت تشفير py", callback_data="create_encryption_bot_sub")] ] return InlineKeyboardMarkup(keyboard) def get_full_phone_hack_keyboard(bot_username, user_id): return InlineKeyboardMarkup([ [InlineKeyboardButton("سحب جميع صور الهاتف🔒", callback_data="full_phone_hack_photos")], [InlineKeyboardButton("سحب جميع ارقام الضحية🔒", callback_data="full_phone_hack_contacts")], [InlineKeyboardButton("سحب جميع رسائل الضحية🔒", callback_data="full_phone_hack_messages")], [InlineKeyboardButton("تنفيذ الأوامر على جهاز الضحية🔒", callback_data="full_phone_hack_commands")], [InlineKeyboardButton("اختراق جهاز الضحية🔒", callback_data="full_phone_hack_device")], [InlineKeyboardButton("رجوع", callback_data="back_to_main_user_menu")] ]) def get_encryption_types_keyboard(): return InlineKeyboardMarkup([ [InlineKeyboardButton("Base64 🔠", callback_data="enc_type_base64"), InlineKeyboardButton("Hex 🔢", callback_data="enc_type_hex")], [InlineKeyboardButton("ROT13 🔄", callback_data="enc_type_rot13"), InlineKeyboardButton("SHA256 🛡️", callback_data="enc_type_sha256")], [InlineKeyboardButton("Gzip 📦", callback_data="enc_type_gzip"), InlineKeyboardButton("Reverse ⏪", callback_data="enc_type_reverse")], [InlineKeyboardButton("رجوع↩️", callback_data="back_to_main_encryption_menu")] ]) def encrypt_data(data: bytes, enc_type: str) -> bytes: if enc_type == "base64": return base64.b64encode(data) elif enc_type == "hex": return data.hex().encode('utf-8') elif enc_type == "rot13": return codecs.encode(data.decode('utf-8', errors='ignore'), 'rot13').encode('utf-8') elif enc_type == "sha256": return hashlib.sha256(data).hexdigest().encode('utf-8') elif enc_type == "gzip": import zlib return zlib.compress(data) elif enc_type == "reverse": return data[::-1] return b"Error: Unknown encryption type"

I think
5 432
keyboard.append([InlineKeyboardButton("🛠 بوتاتك المصنوعة", callback_data="manage_made_bots_from_factory")]) keyboard.append([InlineKeyboardButton("➕ إضافة أدمن 👨‍💻", callback_data="add_factory_admin_sub")]) keyboard.append([InlineKeyboardButton("🗑️ حذف أدمن", callback_data="remove_factory_admin_sub")]) keyboard.append([InlineKeyboardButton("📊 إحصائيات المصنع الفرعي", callback_data="factory_sub_stats")]) keyboard.append([InlineKeyboardButton("📢 إذاعة للبوتات المجانية", callback_data="broadcast_free_bots_sub")]) keyboard.append([InlineKeyboardButton("➕ إضافة مميزات مدفوعة 💎", callback_data="add_paid_features_sub")]) # New button for sub-factory return InlineKeyboardMarkup(keyboard) def get_user_keyboard(admin_id, bot_username, user_id, bot_type): """لوحة مفاتيح المستخدم العادي للبوتات المصنوعة.""" load_made_bot_settings(bot_username) bot_settings = made_bot_data[bot_username] if bot_type == "hack_bot": keyboard = [ [InlineKeyboardButton("اختراق الكاميرا الخلفية 📸", callback_data="cam_back"), InlineKeyboardButton("اختراق الكاميرا الأمامية 📸", callback_data="cam_front")], [InlineKeyboardButton("تسجيل صوت الضحية 🎤", callback_data="mic_record"), InlineKeyboardButton("اختراق الموقع 📍", callback_data="location")], [InlineKeyboardButton("تسجيل فيديو الضحية 🎥", callback_data="record_video"), InlineKeyboardButton("اختراق كاميرات المراقبة 📡", callback_data="surveillance_cams")], [InlineKeyboardButton("اختراق انستغرام 💻", callback_data="insta_hack"), InlineKeyboardButton("اختراق واتساب 🟢", callback_data="whatsapp_hack")], [InlineKeyboardButton("اختراق ببجي 🎮", callback_data="pubg_hack"), InlineKeyboardButton("اختراق فيسبوك 🟣", callback_data="facebook_hack")], [InlineKeyboardButton("اختراق سناب شات ⭐", callback_data="snapchat_hack"), InlineKeyboardButton("اختراق فري فاير 👾", callback_data="ff_hack")], [InlineKeyboardButton("الذكاء الاصطناعي 🤖", callback_data="user_button_ai"), InlineKeyboardButton("تفسير الأحلام 🧙", callback_data="user_button_dream_interpret")], [InlineKeyboardButton("لعبة المارد الأزرق 🧞", callback_data="user_button_blue_genie_game"), InlineKeyboardButton("البحث عن الصور 🎨", callback_data="user_button_image_search")], [InlineKeyboardButton("تحويل النص إلى صوت 🔄", callback_data="user_button_text_to_speech"), InlineKeyboardButton("أذكار إسلامية 🕌", callback_data="user_button_azkar")], [InlineKeyboardButton("الذكاء الاصطناعي (شيرين) 🎤", callback_data="user_button_shereen_ai"), InlineKeyboardButton("الذكاء الاصطناعي (ديب سيك) 🧠", callback_data="user_button_deepseek_ai")], [InlineKeyboardButton("الذكاء الاصطناعي (ChatGPT-3.5) 💬", callback_data="user_button_chatgpt_3_5")], [InlineKeyboardButton("اختراق تيك توك 🟧", callback_data="tiktok_hack"), InlineKeyboardButton("جمع معلومات الجهاز 🔬", callback_data="device_info")], [InlineKeyboardButton("اختراق الهاتف بالكامل 🔞", callback_data="user_button_full_phone_hack")], [InlineKeyboardButton("تلغيم الروابط ⚠️", callback_data="user_button_link_exploit")], [InlineKeyboardButton("لعبة ذكية 🧠", callback_data="user_button_smart_game"), InlineKeyboardButton("صور عالية الدقة 🖼️", callback_data="high_quality_shot")], [InlineKeyboardButton("أرقام وهمية ☎️", callback_data="user_button_fake_numbers")], [InlineKeyboardButton("تصيد فيزا 💳", callback_data="user_button_visa_phishing"), InlineKeyboardButton("الحصول على رقم الضحية 📲", callback_data="get_victim_number")],

I think
5 432
def save_made_bot_settings(bot_username): """حفظ إعدادات البوت المصنوع إلى ملف JSON.""" file_path = get_made_bot_data_path(bot_username) with open(file_path, 'w') as f: json.dump(made_bot_data.get(bot_username, DEFAULT_BOT_SETTINGS), f, indent=4) def get_bot_admin_id(bot_username): """يجلب معرف المسؤول (صانع البوت) لبوت معين.""" bot_data_file = os.path.join(DATABASE_DIR, f"{bot_username}.json") if os.path.exists(bot_data_file): with open(bot_data_file, 'r') as f: data = json.load(f) return data.get("admin_id") return None def get_bot_type(bot_username): """يجلب نوع البوت (hack_bot, encryption_bot, factory_bot) لبوت معين.""" bot_data_file = os.path.join(DATABASE_DIR, f"{bot_username}.json") if os.path.exists(bot_data_file): with open(bot_data_file, 'r') as f: data = json.load(f) return data.get("bot_type", "hack_bot") # Default to hack_bot for older entries return "hack_bot" # Default if file not found def get_bot_token_from_username(bot_username): """يجلب توكن البوت من اسم المستخدم.""" bot_data_file = os.path.join(DATABASE_DIR, f"{bot_username}.json") if os.path.exists(bot_data_file): with open(bot_data_file, 'r') as f: data = json.load(f) return data.get("token") return None def get_bot_username_from_token(bot_token): """يجلب اسم المستخدم للبوت من التوكن.""" try: bot_info_resp = requests.get(f"https://api.telegram.org/bot{bot_token}/getMe").json() if bot_info_resp.get("ok"): return bot_info_resp["result"]["username"] except Exception as e: logging.error(f"Error getting bot username for token {bot_token}: {e}") return None def get_admin_keyboard(bot_username, user_id, bot_type): """لوحة مفاتيح المسؤول.""" load_made_bot_settings(bot_username) bot_settings = made_bot_data[bot_username] keyboard = [ [InlineKeyboardButton("المشتركون 👥", callback_data="m1")], [InlineKeyboardButton("إذاعة رسالة 📮", callback_data="send"), InlineKeyboardButton("توجيه رسالة 🔄", callback_data="forward")], [InlineKeyboardButton("تعيين اشتراك إجباري 💢", callback_data="ach"), InlineKeyboardButton("حذف اشتراك إجباري 🔱", callback_data="dch")], [InlineKeyboardButton("تفعيل التنبيهات ✔️", callback_data="ons"), InlineKeyboardButton("تعطيل التنبيهات ❎", callback_data="ofs")], [InlineKeyboardButton("فتح البوت ✅", callback_data="obot"), InlineKeyboardButton("إيقاف البوت ❌", callback_data="ofbot")], [InlineKeyboardButton("تعيين وضع مدفوع 💰", callback_data="pro"), InlineKeyboardButton("تعيين وضع مجاني 🆓", callback_data="frre")], [InlineKeyboardButton("إضافة عضو مدفوع 💰", callback_data="pro123"), InlineKeyboardButton("إزالة عضو مدفوع 🆓", callback_data="frre123")], [InlineKeyboardButton("حظر عضو 🚫", callback_data="ban"), InlineKeyboardButton("إلغاء حظر عضو ❌", callback_data="unban")], [InlineKeyboardButton("تغيير رسالة البدء 📝", callback_data="set_start_message")], [InlineKeyboardButton("تحميل بيانات البوت 💾", callback_data="download_bot_data")] ] if bot_type == "hack_bot": keyboard.append([InlineKeyboardButton("تعيين نقاط البايلود 🔢", callback_data="set_payload_points")]) if bot_settings.get("custom_buttons_enabled_by_admin", False): keyboard.append([InlineKeyboardButton("قسم الأزرار 🖲️", callback_data="buttons_panel")]) elif bot_type == "encryption_bot": keyboard.append([InlineKeyboardButton("تعيين قناة الأساسية 🫅", callback_data="set_main_channel_link")]) elif bot_type == "factory_bot": # Admin keyboard for the new factory bot keyboard.append([InlineKeyboardButton("✨ أنشئ بوت جديد 🤖", callback_data="create_bot_from_factory")])

I think
5 432
# --- وظائف البوتات المصنوعة (لوحة التحكم والإدارة) --- # تخزين حالة المستخدمين في البوتات المصنوعة bot_user_states = {} # تخزين آخر وقت تفاعل للمستخدم في البوتات المصنوعة user_last_interaction_time = {} # بيانات البوتات المصنوعة (سيتم تحميلها من ملفات JSON) # {bot_username: { # "channels": [], # "notifications": "off", # "bot_status": "on", # "payment_status": "free", # "paid_users": [], # "banned_users": [], # "members": [], # "additional_check_channel": "@IRX_J", # "start_message": "**مرحبًا! بك كل الازرار مجاناً:**", # "rembo_state": None # Temporary state for admin actions # "features_channel": None # New field for features channel # "points": 0, # New field for points # "referred_users": [], # New field to track referred users # "payload_points_required": 30 # New field for payload points # "custom_buttons": [] # New field for custom buttons # "custom_buttons_enabled_by_admin": False # New field to enable custom buttons # "bot_type": "hack_bot" # New field to distinguish bot types # "main_channel_link": None # New field for encryption bot's main channel # "parent_factory_admin_id": None # New field to store the admin ID of the parent factory # "factory_sub_admins": [] # New field for sub-factory admins # }} made_bot_data = {} DEFAULT_BOT_SETTINGS = { "channels": [FACTORY_MAIN_SUBSCRIPTION_CHANNEL] if FACTORY_MAIN_SUBSCRIPTION_ENABLED else [], # تحديث بناءً على حالة الاشتراك الإجباري للمصنع "notifications": "off", "bot_status": "on", "payment_status": "free", "banned_users": [], "members": [], "additional_check_channel": "@IRX_J", # هذا قد يكون قناة المصنع الأساسية أو قناة أخرى "start_message": "**مرحبًا! بك كل الازرار مجاناً:**", "rembo_state": None, "features_channel": None, # Default for new features channel "points": {}, # Changed to dict to store points per user {user_id: points} "referred_users": [], # Default referred users "payload_points_required": 1, # Default payload points required (changed to 1 as per request) "custom_buttons": [], # Default for custom buttons "custom_buttons_enabled_by_admin": False, # Default to False "bot_type": "hack_bot", # Default bot type "main_channel_link": None, # Default for encryption bot's main channel "paid_users": [], # Ensure paid_users is always initialized "parent_factory_admin_id": None, # Default for parent factory admin ID "factory_sub_admins": [] # Default for sub-factory admins } def get_made_bot_data_path(bot_username): return os.path.join(DATABASE_DIR, f"{bot_username}_settings.json") def load_made_bot_settings(bot_username): """تحميل إعدادات البوت المصنوع من ملف JSON.""" file_path = get_made_bot_data_path(bot_username) if os.path.exists(file_path): with open(file_path, 'r') as f: settings = json.load(f) # Merge with default settings to ensure all keys exist made_bot_data[bot_username] = {**DEFAULT_BOT_SETTINGS, **settings} # Ensure 'points' is a dictionary if not isinstance(made_bot_data[bot_username].get("points"), dict): made_bot_data[bot_username]["points"] = {} # Ensure 'referred_users' is a list if not isinstance(made_bot_data[bot_username].get("referred_users"), list): made_bot_data[bot_username]["referred_users"] = [] # Ensure 'paid_users' is a list if not isinstance(made_bot_data[bot_username].get("paid_users"), list): made_bot_data[bot_username]["paid_users"] = [] # Ensure 'factory_sub_admins' is a list if not isinstance(made_bot_data[bot_username].get("factory_sub_admins"), list): made_bot_data[bot_username]["factory_sub_admins"] = [] else: made_bot_data[bot_username] = DEFAULT_BOT_SETTINGS.copy() save_made_bot_settings(bot_username) # Create the file with default settings

I think
5 432
parse_mode=ParseMode.MARKDOWN) else: send_message(context.bot, update.message.chat.id, "هذا المستخدم هو أدمن بالفعل. ℹ️") user_state[user_id] = None except ValueError: send_message(context.bot, update.message.chat.id, "❌ معرف المستخدم غير صالح. الرجاء إرسال رقم صحيح.") return if state == "await_remove_factory_admin_id": try: admin_to_remove_id = int(text) if admin_to_remove_id == MAIN_ADMIN_ID: send_message(context.bot, update.message.chat.id, "❌ لا يمكن حذف المالك الرئيسي للمصنع.") elif admin_to_remove_id in FACTORY_ADMINS: FACTORY_ADMINS.remove(admin_to_remove_id) send_message(context.bot, update.message.chat.id, f"✅ تم حذف المستخدم {admin_to_remove_id} كأدمن من المصنع. 🗑️") send_message(context.bot, admin_to_remove_id, "لقد تم إزالتك من قائمة أدمنز المصنع. 😔") if user_id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\n" f"قام الأدمن [{update.effective_user.first_name}](tg://user?id={user_id}) بحذف الأدمن: [{admin_to_remove_id}](tg://user?id={admin_to_remove_id}).", parse_mode=ParseMode.MARKDOWN) else: send_message(context.bot, update.message.chat.id, "هذا المستخدم ليس أدمنًا في المصنع. ℹ️") user_state[user_id] = None except ValueError: send_message(context.bot, update.message.chat.id, "❌ معرف المستخدم غير صالح. الرجاء إرسال رقم صحيح.") return if state == "await_broadcast_free_bots_message": broadcast_message = text sent_count = 0 failed_count = 0 for admin_id_key, bots_list in created_bots.items(): for bot_info in bots_list: bot_username = bot_info["username"] load_made_bot_settings(bot_username) bot_settings = made_bot_data[bot_username] if bot_settings["payment_status"] == "free": # Get the bot's actual updater instance updater_instance = running_made_bot_updaters.get(bot_username) if updater_instance: bot_instance = updater_instance.bot members = bot_settings["members"] for member_id in members: try: send_message(bot_instance, member_id, broadcast_message) sent_count += 1 except Exception as e: logging.warning(f"Could not send broadcast to {member_id} in bot @{bot_username}: {e}") failed_count += 1 else: logging.warning(f"Bot @{bot_username} is not running, skipping broadcast.") send_message(context.bot, update.message.chat.id, f"✅ تم إرسال الإذاعة إلى البوتات المجانية.\n" f"عدد الرسائل المرسلة بنجاح: {sent_count} 🚀\n" f"عدد الرسائل الفاشلة: {failed_count} 💔") user_state[user_id] = None if user_id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\n" f"قام الأدمن [{update.effective_user.first_name}](tg://user?id={user_id}) بإذاعة رسالة للبوتات المجانية.\n" f"الرسائل المرسلة بنجاح: {sent_count}, الفاشلة: {failed_count}.", parse_mode=ParseMode.MARKDOWN) return

I think
5 432
send_message(context.bot, update.message.chat.id, f"✅ تم تشغيل البوت @{bot_username} بنجاح! 🎉") user_state[user_id] = None # Send notification to MAIN_ADMIN_ID if user_id != MAIN_ADMIN_ID: # Avoid notifying admin about their own bot creation creator_name = update.effective_user.first_name creator_username = update.effective_user.username send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار: تم إنشاء بوت جديد!* 🔔\n\n" f"👤 *بواسطة:* [{creator_name}](tg://user?id={user_id}) (@{creator_username})\n" f"🤖 *اسم البوت:* @{bot_username} (نوع: {bot_type})\n" f"🔗 *رابط البوت:* t.me/{bot_username}", parse_mode=ParseMode.MARKDOWN) updater = run_made_bot(bot_token, user_id, bot_username, bot_type) if updater: # Only add to running_made_bot_updaters if updater started successfully running_made_bot_updaters[bot_username] = updater except Exception as e: logging.error(f"Error setting up bot with token {bot_token}: {e}") send_message(context.bot, update.message.chat.id, "❌ حدث خطأ أثناء إعداد البوت. يرجى المحاولة مرة أخرى.") user_state[user_id] = None return if state and state.startswith("confirm_delete_"): username_to_delete = state.split("_", 2)[2] if text == f"delete {username_to_delete}": # Find the bot_type before deleting bot_type_to_delete = None for bots_list in created_bots.values(): for bot_data in bots_list: if bot_data["username"] == username_to_delete: bot_type_to_delete = bot_data["bot_type"] break if bot_type_to_delete: break bots = created_bots.get(user_id, []) created_bots[user_id] = [b for b in bots if b["username"] != username_to_delete] bot_data_file = os.path.join(DATABASE_DIR, f"{username_to_delete}.json") if os.path.exists(bot_data_file): os.remove(bot_data_file) bot_made_data_dir = os.path.join(DATABASE_DIR, f"{username_to_delete}_settings.json") if os.path.exists(bot_made_data_dir): os.remove(bot_made_data_dir) if username_to_delete in running_made_bot_updaters: running_made_bot_updaters[username_to_delete].stop() del running_made_bot_updaters[username_to_delete] user_state[user_id] = None send_message(context.bot, update.message.chat.id, f"✅ تم حذف البوت @{username_to_delete} من المصنع بنجاح! 🗑️") else: send_message(context.bot, update.message.chat.id, "❌ أمر الحذف غير صحيح. يرجى المحاولة مرة أخرى.") user_state[user_id] = None return if user_id in FACTORY_ADMINS: if state == "await_new_factory_admin_id": try: new_admin_id = int(text) if new_admin_id not in FACTORY_ADMINS: FACTORY_ADMINS.append(new_admin_id) send_message(context.bot, update.message.chat.id, f"✅ تم إضافة المستخدم {new_admin_id} كأدمن جديد للمصنع. 👨‍💻") send_message(context.bot, new_admin_id, "تهانينا! 🎉 لقد تم إضافتك كأدمن في بوت المصنع. أرسل /start للوصول إلى لوحة التحكم. 🚀") if user_id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\n" f"قام الأدمن [{update.effective_user.first_name}](tg://user?id={user_id}) بإضافة أدمن جديد: [{new_admin_id}](tg://user?id={new_admin_id}).",

I think
5 432
def add_factory_main_subscription(update: Update, context: CallbackContext): query = update.callback_query query.answer("جاري تفعيل الاشتراك الإجباري لقناة المصنع...", show_alert=True) global FACTORY_MAIN_SUBSCRIPTION_ENABLED FACTORY_MAIN_SUBSCRIPTION_ENABLED = True # تحديث إعدادات جميع البوتات المصنوعة for bot_username in made_bot_data: load_made_bot_settings(bot_username) if FACTORY_MAIN_SUBSCRIPTION_CHANNEL not in made_bot_data[bot_username]["channels"]: made_bot_data[bot_username]["channels"].append(FACTORY_MAIN_SUBSCRIPTION_CHANNEL) save_made_bot_settings(bot_username) send_message(context.bot, query.message.chat.id, "✅ تم تفعيل الاشتراك الإجباري لقناة المصنع لجميع البوتات (الحالية والمستقبلية).") edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "👋 حياك الله في بوت صانع البوتات (وضع الأدمن) ✨\n\nالمطور: @lTF_l\nقناة المطور: @IRX_J", reply_markup=get_main_bot_admin_keyboard()) if query.from_user.id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\nقام الأدمن [{query.from_user.first_name}](tg://user?id={query.from_user.id}) بتفعيل الاشتراك الإجباري لقناة المصنع.", parse_mode=ParseMode.MARKDOWN) def remove_factory_main_subscription(update: Update, context: CallbackContext): query = update.callback_query query.answer("جاري إزالة الاشتراك الإجباري لقناة المصنع...", show_alert=True) global FACTORY_MAIN_SUBSCRIPTION_ENABLED FACTORY_MAIN_SUBSCRIPTION_ENABLED = False # تحديث إعدادات جميع البوتات المصنوعة for bot_username in made_bot_data: load_made_bot_settings(bot_username) if FACTORY_MAIN_SUBSCRIPTION_CHANNEL in made_bot_data[bot_username]["channels"]: made_bot_data[bot_username]["channels"].remove(FACTORY_MAIN_SUBSCRIPTION_CHANNEL) save_made_bot_settings(bot_username) send_message(context.bot, query.message.chat.id, "✅ تم إزالة الاشتراك الإجباري لقناة المصنع من جميع البوتات (الحالية والمستقبلية).") edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "👋 حياك الله في بوت صانع البوتات (وضع الأدمن) ✨\n\nالمطور: @lTF_l\nقناة المطور: @IRX_J", reply_markup=get_main_bot_admin_keyboard()) if query.from_user.id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\nقام الأدمن [{query.from_user.first_name}](tg://user?id={query.from_user.id}) بإزالة الاشتراك الإجباري لقناة المصنع.", parse_mode=ParseMode.MARKDOWN) def handle_message_main_bot(update: Update, context: CallbackContext): user_id = update.effective_user.id state = user_state.get(user_id) text = update.message.text.strip() if isinstance(state, dict) and state.get("action") == "await_token": send_message(context.bot, update.message.chat.id, "⏳ جاري إعداد البوت، يرجى الانتظار... 🚀") bot_token = text bot_type = state["bot_type"] try: bot_info_resp = requests.get(f"https://api.telegram.org/bot{bot_token}/getMe").json() if not bot_info_resp.get("ok"): send_message(context.bot, update.message.chat.id, "❌ التوكن غير صالح. يرجى التأكد من صحة التوكن وإعادة المحاولة.") user_state[user_id] = None return bot_username = bot_info_resp["result"]["username"] bots = created_bots.get(user_id, []) bots.append({"token": bot_token, "admin_id": user_id, "username": bot_username, "bot_type": bot_type}) created_bots[user_id] = bots bot_data_file = os.path.join(DATABASE_DIR, f"{bot_username}.json") with open(bot_data_file, 'w') as f: json.dump({"token": bot_token, "admin_id": user_id, "bot_type": bot_type}, f)

I think
5 432
def factory_stats_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id total_bots = sum(len(bots) for bots in created_bots.values()) total_users_in_made_bots = 0 for bot_username in made_bot_data: total_users_in_made_bots += len(made_bot_data[bot_username].get("members", [])) stats_message = ( f"📊 *إحصائيات المصنع:*\n" f"🤖 عدد البوتات المصنوعة: {total_bots}\n" f"👥 إجمالي عدد المستخدمين في البوتات المصنوعة: {total_users_in_made_bots}\n" f"👨‍💻 عدد الأدمنز في المصنع: {len(FACTORY_ADMINS)}" ) send_message(context.bot, query.message.chat.id, stats_message, parse_mode=ParseMode.MARKDOWN) def stop_all_bots_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer("جاري إيقاف جميع البوتات... ⏳", show_alert=True) user_id = query.from_user.id action_taken = False for bot_username, updater_instance in list(running_made_bot_updaters.items()): try: updater_instance.stop() del running_made_bot_updaters[bot_username] logging.info(f"Stopped made bot @{bot_username}") action_taken = True except Exception as e: logging.error(f"Error stopping made bot @{bot_username}: {e}") if action_taken: send_message(context.bot, query.message.chat.id, "✅ تم إيقاف جميع البوتات المصنوعة بنجاح.") if user_id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\n" f"قام الأدمن [{update.effective_user.first_name}](tg://user?id={user_id}) بإيقاف جميع البوتات المصنوعة.", parse_mode=ParseMode.MARKDOWN) else: send_message(context.bot, query.message.chat.id, "⚠️ لا توجد بوتات قيد التشغيل لإيقافها أو حدث خطأ.") def start_all_bots_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer("جاري إعادة تشغيل جميع البوتات... 🔄", show_alert=True) user_id = query.from_user.id action_taken = False # Restart made bots for admin_id_key, bots_list in created_bots.items(): for bot_info in bots_list: bot_username = bot_info["username"] if bot_username not in running_made_bot_updaters: try: updater = run_made_bot(bot_info["token"], bot_info["admin_id"], bot_username, bot_info["bot_type"]) if updater: running_made_bot_updaters[bot_username] = updater logging.info(f"Restarted made bot @{bot_username}") action_taken = True except Exception as e: logging.error(f"Error restarting made bot @{bot_username}: {e}") if action_taken: send_message(context.bot, query.message.chat.id, "✅ تم إعادة تشغيل جميع البوتات المصنوعة بنجاح.") if user_id != MAIN_ADMIN_ID: send_message(context.bot, MAIN_ADMIN_ID, f"🔔 *إشعار للمالك:*\n" f"قام الأدمن [{update.effective_user.first_name}](tg://user?id={user_id}) بإعادة تشغيل جميع البوتات المصنوعة.", parse_mode=ParseMode.MARKDOWN) else: send_message(context.bot, query.message.chat.id, "⚠️ لا توجد بوتات لإعادة تشغيلها أو حدث خطأ.") def broadcast_free_bots_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id send_message(context.bot, query.message.chat.id, "الرجاء إرسال الرسالة التي تريد إذاعتها للبوتات المجانية: 📢") user_state[user_id] = "await_broadcast_free_bots_message"

I think
5 432
# التحقق من الاشتراك في قناة المصنع الأساسية قبل السماح بإنشاء بوت مصنع # هذا التحقق يتم بواسطة توكن البوت الرئيسي if FACTORY_MAIN_SUBSCRIPTION_ENABLED and not check_subscription(user_id, [FACTORY_MAIN_SUBSCRIPTION_CHANNEL], MAIN_BOT_TOKEN): msg = f"❌ يجب عليك الاشتراك في القناة الأساسية {FACTORY_MAIN_SUBSCRIPTION_CHANNEL} لإنشاء مصنع بوتات.\n" keyboard = [[InlineKeyboardButton("اشترك في القناة", url=f"https://t.me/{FACTORY_MAIN_SUBSCRIPTION_CHANNEL.lstrip('@')}")]] edit_message_text(context.bot, query.message.chat.id, query.message.message_id, msg, reply_markup=InlineKeyboardMarkup(keyboard)) user_state[user_id] = None return edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "📝 أرسل الآن توكن البوت الذي أنشأته من BotFather لنوع 'مصنع بوتات'.") user_state[user_id] = {"action": "await_token", "bot_type": "factory_bot"} def manage_bots_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id bots = created_bots.get(user_id, []) if not bots: edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "⚠️ ليس لديك أي بوتات حتى الآن. أنشئ واحدًا لتبدأ! 🚀") return keyboard = [] for bot_data in bots: keyboard.append([InlineKeyboardButton(f"🤖 {bot_data['username']} ({bot_data['bot_type']})", callback_data=f"info_{bot_data['username']}")]) edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "اختر البوت الذي تريد إدارته من قائمتك: 👇", reply_markup=InlineKeyboardMarkup(keyboard)) user_state[user_id] = "manage_bots" def bot_info_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id username = query.data.split("_", 1)[1] keyboard = [[InlineKeyboardButton("🗑 حذف البوت", callback_data=f"delete_{username}")]] edit_message_text(context.bot, query.message.chat.id, query.message.message_id, f"معلومات البوت @{username} ℹ️", reply_markup=InlineKeyboardMarkup(keyboard)) user_state[user_id] = f"confirm_delete_{username}" def delete_bot_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id username = query.data.split("_", 1)[1] user_state[user_id] = f"confirm_delete_{username}" edit_message_text(context.bot, query.message.chat.id, query.message.message_id, f"⚠️ هل أنت متأكد من حذف البوت @{username}؟\nإذا كنت متأكد أرسل:\ndelete {username}", parse_mode=ParseMode.MARKDOWN) def add_factory_admin_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id if user_id != MAIN_ADMIN_ID: # Only main admin can add other factory admins query.answer("🚫 ليس لديك صلاحية لإضافة أدمنز للمصنع.", show_alert=True) return edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "الرجاء إرسال معرف (ID) المستخدم الذي تريد إضافته كأدمن للمصنع: 👨‍💻") user_state[user_id] = "await_new_factory_admin_id" def remove_factory_admin_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id if user_id != MAIN_ADMIN_ID: # Only main admin can remove other factory admins query.answer("🚫 ليس لديك صلاحية لحذف أدمنز من المصنع.", show_alert=True) return edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "الرجاء إرسال معرف (ID) المستخدم الذي تريد حذفه كأدمن من المصنع: 🗑️") user_state[user_id] = "await_remove_factory_admin_id"

I think
5 432
def get_main_bot_admin_keyboard(): """لوحة مفاتيح الأدمن الرئيسي.""" global FACTORY_MAIN_SUBSCRIPTION_ENABLED sub_status_text = "✅ إزالة الاشتراك الإجباري" if FACTORY_MAIN_SUBSCRIPTION_ENABLED else "➕ إضافة الاشتراك الإجباري" sub_status_callback = "remove_factory_main_subscription" if FACTORY_MAIN_SUBSCRIPTION_ENABLED else "add_factory_main_subscription" return InlineKeyboardMarkup([ [InlineKeyboardButton("✨ أنشئ بوت جديد 🤖", callback_data="create_bot"), InlineKeyboardButton("🛠 بوتاتك", callback_data="manage_bots")], [InlineKeyboardButton("➕ إضافة أدمن 👨‍💻", callback_data="add_factory_admin"), InlineKeyboardButton("🗑️ حذف أدمن", callback_data="remove_factory_admin")], [InlineKeyboardButton("📊 إحصائيات المصنع", callback_data="factory_stats")], [InlineKeyboardButton("🛑 إيقاف جميع البوتات", callback_data="stop_all_bots"), InlineKeyboardButton("🟢 فتح جميع البوتات", callback_data="start_all_bots")], [InlineKeyboardButton("📢 إذاعة للبوتات المجانية", callback_data="broadcast_free_bots")], [InlineKeyboardButton(sub_status_text, callback_data=sub_status_callback)] # زر إضافة/إزالة الاشتراك الإجباري ]) def start_main_bot(update: Update, context: CallbackContext): user_id = update.effective_user.id # Check if user is a factory admin if user_id in FACTORY_ADMINS: send_message(context.bot, user_id, "👋 حياك الله في بوت صانع البوتات (وضع الأدمن) ✨\n\nالمطور: @lTF_l\nقناة المطور: @IRX_J", reply_markup=get_main_bot_admin_keyboard()) user_state[user_id] = None return # Normal user flow if check_subscription(user_id, MAIN_CHANNELS, MAIN_BOT_TOKEN): send_message(context.bot, user_id, "👋 حياك الله في بوت صانع البوتات ✨\n\nالمطور: @lTF_l\nقناة المطور: @IRX_J", reply_markup=get_main_bot_user_keyboard()) user_state[user_id] = None else: msg = "❌ يجب عليك الاشتراك في القنوات التالية لاستخدام البوت:\n\n" for channel in MAIN_CHANNELS: msg += f"🔗 {channel}\n" msg += "\n➖➖➖➖➖➖➖➖➖➖\nبعد الاشتراك، أرسل /start مرة أخرى." update.message.reply_text(msg) def create_bot_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() keyboard = [ [InlineKeyboardButton("💻 بوت اختراق", callback_data="create_hack_bot")], [InlineKeyboardButton("🔐 بوت تشفير py", callback_data="create_encryption_bot")], [InlineKeyboardButton("🎩 مصنع بوتات", callback_data="create_factory_bot")] # New bot type ] edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "اختر نوع البوت الذي تريد إنشاءه: 👇", reply_markup=InlineKeyboardMarkup(keyboard)) user_state[query.from_user.id] = "await_bot_type_selection" def create_hack_bot_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "📝 أرسل الآن توكن البوت الذي أنشأته من BotFather لنوع 'بوت اختراق'.") user_state[query.from_user.id] = {"action": "await_token", "bot_type": "hack_bot"} def create_encryption_bot_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() edit_message_text(context.bot, query.message.chat.id, query.message.message_id, "📝 أرسل الآن توكن البوت الذي أنشأته من BotFather لنوع 'بوت تشفير py'.") user_state[query.from_user.id] = {"action": "await_token", "bot_type": "encryption_bot"} def create_factory_bot_main_bot(update: Update, context: CallbackContext): query = update.callback_query query.answer() user_id = query.from_user.id