├── README.md └── main.py /README.md: -------------------------------------------------------------------------------- 1 | # Redeem-Bot 2 | 3 | ## Overview 4 | The **Redeem-Bot** is a Telegram bot that provides users with a seamless way to redeem premium accounts and interact with services. This bot is built using Python's `telebot` library and offers features like code generation, redemption, and broadcasting. 5 | 6 | ## Features 7 | - 🔑 **Code Generation**: Generate unique redeem codes for multiple services. 8 | - 🎟️ **Code Redemption**: Users can redeem codes to access premium accounts. 9 | - 📊 **Statistics**: View bot statistics like uptime and user count. 10 | - 📢 **Broadcasting**: Owners can send messages to all users. 11 | - 📜 **Privacy Policy**: Transparency about user data and privacy. 12 | - 🤝 **Support**: Users can contact the bot owner directly for issues. 13 | - ❓ **FAQ**: Frequently asked questions answered within the bot. 14 | 15 | ## About the Coder 16 | This bot was developed by **@abirxdhack**, a skilled developer and modder with expertise in Python, JavaScript, PHP, and Android app modification. Abir is known for creating efficient and user-friendly tools that solve real-world problems. 17 | 18 | > **Note**: Abir is not just a coder but a community builder who actively engages with users to improve their experience and provide exceptional support. 19 | 20 | ## GitHub Statistics 21 | | 🌟 Stars | 🍴 Forks | 🔄 Pull Requests | 22 | |----------|----------|-----------------| 23 | | 2M | 2M | 15k | 24 | 25 | > **Tip**: If you find this bot useful, consider starring the repository and contributing to its development! 26 | 27 | ## Setup Instructions 28 | 1. **Prerequisites**: 29 | - Python 3.8 or above installed on your system. 30 | - `pip` package manager to install dependencies. 31 | 2. **Clone the Repository**: 32 | ```bash 33 | git clone https://github.com/your-repo/modviprm-bot.git 34 | cd modviprm-bot 35 | ``` 36 | 3. **Install Dependencies**: 37 | ```bash 38 | pip install -r requirements.txt 39 | ``` 40 | 4. **Configure the Bot**: 41 | - Create a bot using BotFather on Telegram and obtain the API token. 42 | - Replace the `BOT_TOKEN` and other placeholders in the `main.py` file. 43 | ```python 44 | BOT_TOKEN = 'your_bot_token_here' 45 | OWNER_USER_ID = your_owner_id 46 | PROOF_CHANNEL_ID = your_proof_channel_id 47 | FORWARD_CHANNEL_IDS = [list, of, channel, ids] 48 | ``` 49 | 5. **Run the Bot**: 50 | ```bash 51 | python main.py 52 | ``` 53 | 6. **Verify**: 54 | - Open Telegram and interact with your bot using `/start`. 55 | 56 | > **Note**: Ensure you join the required channels listed in the bot to unlock its features. 57 | 58 | ## Free Hosting and VPS Hosting Tutorial 59 | 60 | ### Free Hosting: 61 | 1. **Sign Up for a Free Hosting Provider**: 62 | - Visit [InfinityFree](https://www.infinityfree.net/) or [FreeHostia](https://www.freehostia.com/). 63 | - Create a free account. 64 | 2. **Set Up Your Domain**: 65 | - If you don’t have a domain, you can use the free subdomain provided by the hosting service. 66 | 3. **Upload Files**: 67 | - Access the file manager from the hosting control panel. 68 | - Upload your bot files or website scripts. 69 | 4. **Database Configuration**: 70 | - If your project uses a database, create one in the hosting control panel. 71 | - Update the database credentials in your project files. 72 | 5. **Go Live**: 73 | - Test your bot or website by accessing the provided URL. 74 | 75 | ### Free VPS Hosting: 76 | 1. **Select a Free VPS Provider**: 77 | - Visit [Oracle Cloud](https://www.oracle.com/cloud/free/) or [Google Cloud Free Tier](https://cloud.google.com/free). 78 | - Sign up and redeem free credits. 79 | 2. **Set Up the VPS**: 80 | - Choose a lightweight Linux distribution like Ubuntu. 81 | - Deploy the VPS instance. 82 | 3. **Connect to the VPS**: 83 | - Use SSH to connect to the VPS from your terminal: 84 | ```bash 85 | ssh username@your-vps-ip 86 | ``` 87 | 4. **Install Required Software**: 88 | - Update the system: 89 | ```bash 90 | sudo apt update && sudo apt upgrade 91 | ``` 92 | - Install Python and other dependencies: 93 | ```bash 94 | sudo apt install python3 python3-pip 95 | ``` 96 | 5. **Deploy Your Bot**: 97 | - Clone your bot repository and run it on the VPS: 98 | ```bash 99 | git clone https://github.com/abirxdhackz/Redeem-bot.git 100 | cd Redeem-bot 101 | python3 main.py 102 | ``` 103 | 104 | > **Reminder**: Always monitor your usage limits to avoid exceeding free tier allowances. 105 | 106 | ## BotFather Commands 107 | You can configure and interact with the bot using the following commands in **BotFather**: 108 | 109 | ```txt 110 | start - ☑️ Start The Bot ☑️ 111 | stats - 📊 See Statistics 📊 112 | send - ☑️ Broadcast Message To Users ☑️ 113 | redeem - ☑️ Redeem Codes ☑️ 114 | gen - ☑️ Generate Redeem Codes ☑️ 115 | privacy - ☑️ Privacy & Policy ☑️ 116 | help - ☑️ Get Bot All Commands Help ☑️ 117 | update - ☑️ Update Bot To Supreme ☑️ 118 | post - ☑️ Post To Multiple Channels ☑️ 119 | support - ☑️ Contact Bot Owner ☑️ 120 | info - ☑️ Get Bot Info ☑️ 121 | faq - ☑️ Recently Asked Questions ☑️ 122 | ``` 123 | 124 | > **Reminder**: Regularly update the bot to enjoy the latest features and improvements. 125 | 126 | > **Quote**: *"Copying someone’s work without giving credit is like stealing their efforts and passion. Always respect the creator's dedication by acknowledging their work."* 127 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import telebot 2 | import time 3 | import random 4 | from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery 5 | from datetime import datetime, timedelta 6 | 7 | # Bot token 8 | BOT_TOKEN = '7217012373:AAHFRCmGs10I0jFE3qCHAjS4db3eE6ewn_c' 9 | OWNER_USER_ID = 7303810912 10 | PROOF_CHANNEL_ID = -1002113563800 #Replace With The Chat Id Of The Channel Which Will Be Proof Channel 11 | FORWARD_CHANNEL_IDS = [-1002224203739, -1001974696244, -1002113563800] #Replace With The Ids Of The Channel To Be Posted 12 | 13 | bot = telebot.TeleBot(BOT_TOKEN) 14 | 15 | required_channels = ["@TheSmartDev", "@modviprmbackup", "@modDirect_download"] 16 | buttons = [ 17 | ("🔗SmartDev", "https://t.me/TheSmartDev"), 18 | ("🔗 ModVipRM Backup", "https://t.me/modviprmbackup"), 19 | ("📂 ModVipRM APK", "https://t.me/modDirect_download") 20 | ] 21 | 22 | # Dictionary to store the mapping of forwarded messages to original users 23 | forwarded_messages = {} 24 | 25 | # Define promo links for different services 26 | promo_links = { 27 | "YouTube": [ 28 | "https://families.google.com/join/promo/StTMvLwjgxuEhNMIIqeUPQA9ZzjJuQ?pli=1", 29 | "https://families.google.com/join/promo/hIx3V_H3WcEHbgv8Vr9h1YMG5ceGkw?pli=1", 30 | "https://families.google.com/join/promo/DSgghlmPq1nVoB5npLTqhQJSUq_CGw?pli=1", 31 | "https://families.google.com/join/promo/-6qah32kH-4yORY2993Wc2qfNRSaBA?pli=1", 32 | "https://families.google.com/join/promo/nvNKCIgHPNeh3ORtIb0r0FSISxPERw?pli=1" 33 | ], 34 | "Crunchyroll": [ 35 | "Email: nitrovai914@gmail.com Pass: Samiul098@", 36 | "Email: nitrovai914@gmail.com Pass: Samiul098@", 37 | "Email: nitrovai914@gmail.com Pass: Samiul098@", 38 | "Email: nitrovai914@gmail.com Pass: Samiul098@", 39 | "Email: nitrovai914@gmail.com Pass: Samiul098@" 40 | ], 41 | "Canva": [ 42 | "Email: example1@canva.com Pass: password1", 43 | "Email: example2@canva.com Pass: password2" 44 | ], 45 | "Hostinger": [ 46 | "Email: example1@hostinger.com Pass: password1", 47 | "Email: example2@hostinger.com Pass: password2" 48 | ], 49 | "Netflix": [ 50 | "Email: example1@netflix.com Pass: password1", 51 | "Email: example2@netflix.com Pass: password2" 52 | ], 53 | "PrimeVideo": [ 54 | "Email: example1@primevideo.com Pass: password1", 55 | "Email: example2@primevideo.com Pass: password2" 56 | ], 57 | "Spotify": [ 58 | "Email: example1@spotify.com Pass: password1", 59 | "Email: example2@spotify.com Pass: password2" 60 | ] 61 | } 62 | 63 | # Define image URLs for different services 64 | service_images = { 65 | "YouTube": "https://t.me/BotsDevZone/269", 66 | "Crunchyroll": "https://t.me/BotsDevZone/270", 67 | "Netflix": "https://t.me/BotsDevZone/271", 68 | "PrimeVideo": "https://t.me/BotsDevZone/272", 69 | "Canva": "https://t.me/BotsDevZone/273", 70 | "Spotify": "https://t.me/BotsDevZone/274" 71 | } 72 | 73 | # Storage for generated codes and redeemed information 74 | generated_codes = {} 75 | redeemed_codes = {} 76 | # Storage for user IDs 77 | user_ids = set() 78 | # Bot start time 79 | start_time = datetime.now() 80 | 81 | # Function to check channel join status 82 | def is_user_in_channels(user_id): 83 | try: 84 | for channel in required_channels: 85 | status = bot.get_chat_member(channel, user_id).status 86 | if status not in ['member', 'administrator', 'creator']: 87 | return False 88 | return True 89 | except Exception as e: 90 | print(f"Error checking channel status: {e}") 91 | return False 92 | 93 | # Start command handler 94 | @bot.message_handler(commands=['start']) 95 | def start(message): 96 | user_id = message.from_user.id 97 | # Store user ID for broadcasting later 98 | user_ids.add(user_id) 99 | try: 100 | if not is_user_in_channels(user_id): 101 | keyboard = InlineKeyboardMarkup() 102 | # Arrange buttons in 2-2-1 formation 103 | keyboard.row(InlineKeyboardButton(text="🔗 SmartDev", url="https://t.me/TheSmartDev"), 104 | InlineKeyboardButton(text="🔗 ModVipRM Backup", url="https://t.me/modviprmbackup")) 105 | keyboard.row(InlineKeyboardButton(text="📂 ModVipRM APK", url="https://t.me/modDirect_download")) 106 | keyboard.add(InlineKeyboardButton(text="✅ Joined", callback_data="joined_check")) 107 | 108 | bot.send_photo( 109 | message.chat.id, 110 | photo="https://t.me/BotsDevZone/275", 111 | caption=("*Welcome to Redeem Code ABIR XD Bot!*\n\n" 112 | "*You can now use the bot.*\n" 113 | "*Use /redeem to redeem a code.*\n" 114 | "*OWNER: @ISmartDevs*\n" 115 | "*Join: ModVipRM*"), 116 | reply_markup=keyboard, 117 | parse_mode="Markdown" 118 | ) 119 | else: 120 | bot.send_message(message.chat.id, "*Welcome back! You are already joined! Use /redeem to redeem.*", parse_mode="Markdown") 121 | except telebot.apihelper.ApiTelegramException as e: 122 | if e.error_code == 403: 123 | print(f"User {user_id} has blocked the bot.") 124 | else: 125 | print(f"Error: {e}") 126 | 127 | # Callback handler for joined button 128 | @bot.callback_query_handler(func=lambda call: call.data == "joined_check") 129 | def joined_check(call): 130 | user_id = call.from_user.id 131 | if is_user_in_channels(user_id): 132 | bot.answer_callback_query(call.id, "You have joined the channels!") 133 | bot.send_message(call.message.chat.id, "*You can now use the bot. Use /redeem to redeem a code.*", parse_mode="Markdown") 134 | else: 135 | bot.answer_callback_query(call.id, "Please join all required channels first.", show_alert=True) 136 | 137 | # Generate redeem codes (Owner only) 138 | @bot.message_handler(commands=['gen']) 139 | def generate_codes(message): 140 | if message.from_user.username != "ISmartDevs": 141 | bot.reply_to(message, "You are not authorized to use this command.") 142 | return 143 | 144 | try: 145 | _, count, service_name = message.text.split() 146 | count = int(count) 147 | except ValueError: 148 | bot.reply_to(message, "*Usage: /gen *", parse_mode="Markdown") 149 | return 150 | 151 | valid_services = [ 152 | "YouTube", "Crunchyroll", "Canva", "Hostinger", "Netflix", "PrimeVideo", "Spotify" 153 | ] 154 | 155 | if service_name not in valid_services: 156 | bot.reply_to(message, f"*Invalid service name. Please choose from: {', '.join(valid_services)}*", parse_mode="Markdown") 157 | return 158 | 159 | codes = [] 160 | for _ in range(count): 161 | code = f"{service_name.upper()}-{random.randint(1000, 9999)}-{random.randint(1000, 9999)}-{random.randint(1000, 9999)}" 162 | if code not in generated_codes: # Ensure unique codes 163 | generated_codes[code] = None 164 | codes.append(code) 165 | 166 | # Format the codes as per the new requirement 167 | formatted_codes = "\n".join([f"➔ `{code}` ☑️" for code in codes]) 168 | 169 | keyboard = InlineKeyboardMarkup() 170 | keyboard.add(InlineKeyboardButton(text="🧾 Updates Channel ☑️", url="https://t.me/ModVipRM")) 171 | keyboard.add(InlineKeyboardButton(text="🤖 Bot Owner ☑️", url="https://t.me/ISmartDevs")) 172 | 173 | bot.reply_to( 174 | message, 175 | f"*Hey Bro All The Codes Generated Are Below For {service_name}.*\n\n{formatted_codes}\n\n*Need help? Join our channels or contact the bot owner for assistance!*", 176 | parse_mode="Markdown", 177 | reply_markup=keyboard 178 | ) 179 | 180 | # Post command handler 181 | @bot.message_handler(commands=['post']) 182 | def post_announcement(message): 183 | if message.from_user.username != "ISmartDevs": 184 | bot.reply_to(message, "You are not authorized to use this command.") 185 | return 186 | 187 | if not generated_codes: 188 | bot.reply_to(message, "No codes have been generated yet.") 189 | return 190 | 191 | # Extract the service name from the first code 192 | first_code = next(iter(generated_codes.keys())) 193 | service_name = first_code.split('-')[0].capitalize() 194 | 195 | # Special case for "PrimeVideo" 196 | if service_name.lower() == "primevideo": 197 | service_name = "PrimeVideo" 198 | 199 | # Format the codes for the post 200 | formatted_codes = "\n".join([f"➔ `{code}` ☑️" for code in generated_codes.keys()]) 201 | 202 | # Create the post content 203 | post_content = ( 204 | f"➡️ ✨ *{service_name} Premium Account Giveaway* ✨ ⬅️\n\n" 205 | f"🟢 *Generated {len(generated_codes)} Redeem Codes* 🟢:\n\n" 206 | f"{formatted_codes}\n\n" 207 | f"➡️ *Redeem The Code By Sending This Command- /redeem {first_code.split('-')[0]}-XXXX-XXXX-XXXX*\n\n" 208 | f"➡️ *Redeem From This Bot- Xtreme Redeem ⚡️ [Open Bot To Redeem](https://t.me/Redeem_Ultimate_Bot)*\n\n" 209 | "🔹 *First 05 Users Will Win It* 🔺\n" 210 | "🔹 *Hurry Up! Only The First 5 Users Will Win This Giveaway !* ⌛️\n\n" 211 | "❤️ *Send Screenshot There- @ISmartDevs* ✅ ✔️\n\n" 212 | "➡️ *Share Our Channel For More Exciting Giveaways* ✅\n" 213 | "➡️ *For More Enquiry —— ❤️ @ISmartDevs* ✔️\n" 214 | "➡️ *For More Information Check @ModVipRM* ☝️\n\n" 215 | "❤️ *Thank You For Staying With Us* ❤️" 216 | ) 217 | 218 | # Get the image URL for the service 219 | image_url = service_images.get(service_name, "https://t.me/abir_x_official_developer/82") 220 | 221 | # Define the keyboard 222 | keyboard = InlineKeyboardMarkup() 223 | keyboard.add(InlineKeyboardButton(text="✅ Open Bot To Redeem", url="https://t.me/Redeem_Ultimate_Bot")) 224 | 225 | # Send the post to the main channel 226 | try: 227 | bot.send_photo( 228 | message.chat.id, 229 | photo=image_url, 230 | caption=post_content, 231 | reply_markup=keyboard, 232 | parse_mode="Markdown" 233 | ) 234 | except Exception as e: 235 | bot.reply_to(message, f"Error sending post to the main channel: {e}") 236 | 237 | # Forward the post to other channels 238 | for channel_id in FORWARD_CHANNEL_IDS: 239 | try: 240 | bot.send_photo( 241 | channel_id, 242 | photo=image_url, 243 | caption=post_content, 244 | reply_markup=keyboard, 245 | parse_mode="Markdown" 246 | ) 247 | except Exception as e: 248 | print(f"Error forwarding post to channel {channel_id}: {e}") 249 | 250 | # Function to handle the /redeem command 251 | @bot.message_handler(commands=['redeem']) 252 | def redeem_code(message): 253 | """ Redeem the code provided by the user """ 254 | user_id = message.from_user.id 255 | username = message.from_user.username or "N/A" 256 | full_name = message.from_user.full_name or "N/A" 257 | 258 | if not is_user_in_channels(user_id): 259 | bot.send_message(message.chat.id, "Please join all required channels first.") 260 | return 261 | 262 | try: 263 | _, code = message.text.split() 264 | except ValueError: 265 | bot.send_photo( 266 | message.chat.id, 267 | photo="https://t.me/BotsDevZone/275", 268 | caption="Please provide a code to redeem." 269 | ) 270 | return 271 | 272 | if code not in generated_codes: 273 | bot.send_photo( 274 | message.chat.id, 275 | photo="https://t.me/BotsDevZone/275", 276 | caption="Invalid redeem code. Please try again with a valid code." 277 | ) 278 | return 279 | 280 | if generated_codes[code] is not None: 281 | redeemer = generated_codes[code] 282 | bot.send_photo( 283 | message.chat.id, 284 | photo="https://t.me/BotsDevZone/275", 285 | caption=(f"🎉 *Code Already Redeemed!*\n" 286 | f"👤 *Name:* {redeemer['full_name']}\n" 287 | f"📛 *Username:* {redeemer['username']}\n" 288 | f"🆔 *ID:* {redeemer['user_id']}\n" 289 | f"⏰ *Time:* {redeemer['time']}"), 290 | parse_mode="Markdown" 291 | ) 292 | return 293 | 294 | if user_id in [data['user_id'] for data in generated_codes.values() if data]: 295 | bot.send_message(message.chat.id, "*You have already redeemed a code.*", parse_mode="Markdown") 296 | return 297 | 298 | timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") 299 | generated_codes[code] = { 300 | 'user_id': user_id, 301 | 'username': username, 302 | 'full_name': full_name, 303 | 'time': timestamp 304 | } 305 | 306 | # Determine the service from the code and select a promo link and image 307 | service_name = code.split('-')[0].title() 308 | 309 | if service_name == "Youtube": 310 | promo_link = random.choice(promo_links["YouTube"]) # Get a link from the predefined list for YouTube 311 | else: 312 | promo_link = random.choice(promo_links.get(service_name, ["Email: example@default.com Pass: password"])) # Default email-pass format if service not found 313 | 314 | image_url = service_images.get(service_name, "https://t.me/BotsDevZone/269") # Default to YouTube image if service not found 315 | 316 | # Check if the promo link is an email/pass format or a URL 317 | if service_name == "Youtube" or "Email:" not in promo_link: 318 | keyboard = InlineKeyboardMarkup() 319 | keyboard.add(InlineKeyboardButton(text=f"🔗 Open {service_name} Premium Link", url=promo_link)) 320 | keyboard.add(InlineKeyboardButton(text="📜 How To Leave Old Family", url="https://t.me/ModVipRM/3530")) 321 | 322 | bot.send_photo( 323 | message.chat.id, 324 | photo=image_url, 325 | caption=(f"🎉 *Code Redeemed Successfully!*\n" 326 | f"👤 *Name:* {full_name}\n" 327 | f"📛 *Username:* {username}\n" 328 | f"🆔 *ID:* {user_id}\n" 329 | f"⏰ *Time:* {timestamp}\n" 330 | f"🔗 *Your {service_name} Premium link:* {promo_link}"), 331 | reply_markup=keyboard, 332 | parse_mode="Markdown" 333 | ) 334 | else: 335 | promo_text = f"🔗 *Your {service_name} Premium account:* {promo_link}" 336 | keyboard = InlineKeyboardMarkup() 337 | keyboard.add(InlineKeyboardButton(text="📜 How To Leave Old Family", url="https://t.me/ModVipRM/3530")) 338 | 339 | bot.send_photo( 340 | message.chat.id, 341 | photo=image_url, 342 | caption=(f"🎉 *Code Redeemed Successfully!*\n" 343 | f"👤 *Name:* {full_name}\n" 344 | f"📛 *Username:* {username}\n" 345 | f"🆔 *ID:* {user_id}\n" 346 | f"⏰ *Time:* {timestamp}\n" 347 | f"{promo_text}"), 348 | reply_markup=keyboard, 349 | parse_mode="Markdown" 350 | ) 351 | 352 | proof_message = (f"🎉 *Code Redeemed Successfully!*\n" 353 | f"👤 *Name:* {full_name}\n" 354 | f"📛 *Username:* {username}\n" 355 | f"🆔 *ID:* {user_id}\n" 356 | f"⏰ *Time:* {timestamp}\n\n" 357 | f"*Use the bot to get your own {service_name} Premium account!*\n" 358 | f"*Join our channels for more updates and giveaways!*") 359 | 360 | proof_keyboard = InlineKeyboardMarkup() 361 | proof_keyboard.add(InlineKeyboardButton(text="🤖 Get Premium Account Now ☑️", url="https://t.me/Redeem_Ultimate_Bot")) 362 | proof_keyboard.add(InlineKeyboardButton(text="📜 Get Redeem Codes ☑️", url="https://t.me/addlist/wskLZdSg8K02NzVl")) 363 | 364 | bot.send_message(PROOF_CHANNEL_ID, proof_message, reply_markup=proof_keyboard, parse_mode="Markdown") 365 | 366 | # Forward the proof message to the owner 367 | try: 368 | bot.send_message(OWNER_USER_ID, proof_message, reply_markup=proof_keyboard, parse_mode="Markdown") 369 | except telebot.apihelper.ApiTelegramException as e: 370 | print(f"Error sending message to owner: {e}") 371 | 372 | # Send command handler to broadcast messages 373 | @bot.message_handler(commands=['send']) 374 | def ask_broadcast_message(message): 375 | if message.from_user.id != OWNER_USER_ID: 376 | bot.reply_to(message, "You are not authorized to use this command.") 377 | return 378 | 379 | msg = bot.reply_to(message, "*Please Enter A Message To Broadcast To Users*", parse_mode="Markdown") 380 | bot.register_next_step_handler(msg, broadcast_message) 381 | 382 | def broadcast_message(message): 383 | if message.from_user.id != OWNER_USER_ID: 384 | bot.reply_to(message, "You are not authorized to use this command.") 385 | return 386 | 387 | broadcast_text = f"*📢 [ Broadcast From Owner ] 📢*\n\n{message.text}\n\n*For More Updates, [Join Now](https://t.me/ModVipRM)*" 388 | keyboard = InlineKeyboardMarkup() 389 | keyboard.add(InlineKeyboardButton(text="☑️ Join Our All Community 🥰", url="https://t.me/addlist/wskLZdSg8K02NzVl")) 390 | 391 | for user_id in user_ids: 392 | try: 393 | bot.send_message(user_id, broadcast_text, reply_markup=keyboard, parse_mode="Markdown", disable_web_page_preview=True) 394 | except telebot.apihelper.ApiTelegramException as e: 395 | print(f"Error sending message to user {user_id}: {e}") 396 | 397 | # Notify the owner that the broadcast was successful 398 | bot.send_message(OWNER_USER_ID, "*Broadcast successful!*", parse_mode="Markdown") 399 | 400 | # Start the bot 401 | print("Bot is running...") 402 | bot.polling() 403 | --------------------------------------------------------------------------------