Created At: 2026-11-19T09:05:54Z Completed At: 2026-11-19T09:05:54Z Command exited with code 0. Command output: 384- parse_mode="HTML", 385- ) 386- else: 387- await TelegramApiService.send_message_with_retry( 388- raw_token=raw_token, 389- chat_id=chat_id, 390- text="🎁 Redeem Promotional Code\n\nPlease send your voucher code:\n/redeem YOUR_CODE\n\nExample: /redeem WELCOME100", 391- parse_mode="HTML", 392- ) 393- return {"ok": True, "callback": "redeem"} 394- 395- elif text in ("mod_referrals", "referral"): 396- if not await module_service.is_trigger_allowed(bot_id, "referrals", "inline_button"): 397- await TelegramApiService.send_message_with_retry( 398- raw_token=raw_token, 399- chat_id=chat_id, 400- text="⚠️ Referral buttons are currently deactivated on this bot.", 401- parse_mode="HTML", 402- ) 403- else: 404: ref_summary = await module_service.get_referral_summary(bot_id, tg_uid, bot.username) 405- await TelegramApiService.send_message_with_retry( 406- raw_token=raw_token, 407- chat_id=chat_id, 408- text=ref_summary["formatted_message"], 409- parse_mode="HTML", 410- ) 411- return {"ok": True, "callback": "referrals"} 412- 413- elif text in ("mod_subscriptions", "plans"): 414- if not await module_service.is_trigger_allowed(bot_id, "subscriptions", "inline_button"): 415- await TelegramApiService.send_message_with_retry( 416- raw_token=raw_token, 417- chat_id=chat_id, 418- text="⚠️ Subscription buttons are currently deactivated on this bot.", 419- parse_mode="HTML", 420- ) 421- else: 422- sub_cfg = await module_service.get_module_config(bot_id, "subscriptions") 423- tiers = sub_cfg.get("tiers", []) 424- tier_lines = "\n".join([f"• {t.get('name', 'Tier')}: ₹{t.get('price', 0)} ({t.get('days', 30)} days)" for t in tiers]) -- 778- elif text.startswith("/referral") or text.startswith("/invite") or text in ("👥 Invite Friends", "👥 Referral Program", "👥 Referral"): 779- is_cmd = text.startswith("/") 780- trigger_type = "command" if is_cmd else "menu_button" 781- 782- if not await module_service.is_module_active(bot_id, "referrals"): 783- await TelegramApiService.send_message_with_retry( 784- raw_token=raw_token, 785- chat_id=chat_id, 786- text="⚠️ The Referral Program is currently deactivated on this bot.", 787- parse_mode="HTML", 788- ) 789- elif not await module_service.is_trigger_allowed(bot_id, "referrals", trigger_type): 790- trigger_name = "referral commands" if is_cmd else "Referral menu button" 791- await TelegramApiService.send_message_with_retry( 792- raw_token=raw_token, 793- chat_id=chat_id, 794- text=f"⚠️ The {trigger_name} has been turned off by the bot administrator.", 795- parse_mode="HTML", 796- ) 797- else: 798: ref_summary = await module_service.get_referral_summary(bot_id, tg_uid, bot.username) 799- await TelegramApiService.send_message_with_retry( 800- raw_token=raw_token, 801- chat_id=chat_id, 802- text=ref_summary["formatted_message"], 803- parse_mode="HTML", 804- ) 805- 806- # --- Subscriptions / Plans Handling (Command or Menu Button) --- 807- elif text.startswith("/plans") or text.startswith("/subscribe") or text in ("👑 VIP Plans", "👑 Plans", "VIP Plans"): 808- is_cmd = text.startswith("/") 809- trigger_type = "command" if is_cmd else "menu_button" 810- 811- if not await module_service.is_module_active(bot_id, "subscriptions"): 812- await TelegramApiService.send_message_with_retry( 813- raw_token=raw_token, 814- chat_id=chat_id, 815- text="⚠️ Subscriptions are currently deactivated on this bot.", 816- parse_mode="HTML", 817- ) 818- elif not await module_service.is_trigger_allowed(bot_id, "subscriptions", trigger_type):