import telebot # Bot Token (7868852585:AAHYacfFo4cfbbdYlO4ZEDZv-fKqa_tH47A) BOT_TOKEN = "YOUR_BOT_TOKEN" # Channels ka list CHANNELS = ["@Target_Earning", "@newyonoapp", "@AllYonoGiftsCode", "@SattaPower02"] # Gift Codes GIFT_CODES = ["CODE123", "WELCOME2024", "FREEGIFT", "SPECIALCODE"] bot = telebot.TeleBot(BOT_TOKEN) # Function to check if user joined all channels def is_user_joined_all_channels(user_id): for channel in CHANNELS: try: chat_member = bot.get_chat_member(channel, user_id) if chat_member.status not in ["member", "administrator", "creator"]: return False # Agar ek bhi channel join nahi kiya toh False except Exception: return False # Agar channel unavailable hai toh bhi False return True # Agar sab join kiye hain toh True @bot.message_handler(commands=['start']) def start_message(message): user_id = message.from_user.id if is_user_joined_all_channels(user_id): if GIFT_CODES: gift_code = GIFT_CODES.pop(0) # Pehla available gift code bhejta hai bot.send_message(message.chat.id, f"🎉 Aapne sabhi channels join kar liye! Aapka Gift Code: {gift_code}") else: bot.send_message(message.chat.id, "😔 Sorry, saare gift codes khatam ho gaye!") else: channels_list = "\n".join([f"➡️ {ch}" for ch in CHANNELS]) bot.send_message( message.chat.id, f"❌ Pehle in sabhi channels ko join karein:\n{channels_list}\n\nPhir /start type karein!" ) # Bot Polling bot.polling()