=== Telegram Bot Setup === Step 1: Initializing database... ✓ Database initialized successfully! Database file: /home/ebottop/upload-7.ebot.top/dbwwq1-real.db Step 1.5: Running migrations... Running migrate.php... === Database Migration Started === Creating new tables (channel_lock_stats)... ✓ Tables created/verified Migrating channels table... ✓ Channels table migrated === Migration Completed Successfully === You can now use the channel lock tracking features! The new features include: - Track users who view channel locks - Track users who were already members - Track users who joined through the lock - Track users who didn't join - View statistics for each channel lock To view statistics: 1. Go to admin panel 2. Click 'قفل کانال' 3. Click on any channel 4. Click 'مشاهده آمار' ✓ migrate.php executed. Running migrate_fake_channels.php... === Fake Channels Migration Started === Creating new tables (fake_channels, user_sessions)... ✓ Tables created/verified === Migration Completed Successfully === New features enabled: - Fake channel locks (timer-based anti-spam) - 30-second session timer for file access - Mixed real + fake channel display Admin Panel Changes: - New button: '🎭 قفل کانال جعلی' - Add fake channels (title + link) - View and remove fake channels User Experience: - Users see randomized mix of real + fake channels - Must wait 30 seconds before 'عضو شدم' works - Only real channels are verified - Fake channels act as timer mechanism To add fake channels: 1. Send /start to bot as admin 2. Click '🎭 قفل کانال جعلی' 3. Click '➕ افزودن کانال جعلی' 4. Enter title and link ✓ migrate_fake_channels.php executed. Running migrate_limits_admins.php... === Migration Started: Channel Limits & Admin Management === Step 1: Migrating channels table... ✓ join_limit column already exists ✓ time_limit_hours column already exists ✓ is_active column already exists Step 2: Creating dynamic_admins table... ✓ dynamic_admins table created Step 3: Verifying channel_lock_stats table... ✓ channel_lock_stats table verified (supports 'left' action) === Migration Completed Successfully === New Features Available: 1. ⚙️ Channel Limits: - Set maximum number of joins per channel - Set time limit (in hours) for channel locks - Channels auto-disable when limits are reached 2. 👥 Admin Management: - Add/remove dynamic admins from the panel - Config admins (in config.php) cannot be removed - Track who added each admin and when 3. 📊 Left User Tracking: - Automatically track users who leave channels - View 'left' count in channel statistics - Requires chat_member updates to be enabled in BotFather IMPORTANT: Enable chat_member updates (2 steps required): STEP 1: Update webhook configuration Run: php setup.php This updates the webhook to receive chat_member updates STEP 2: Enable in BotFather 1. Message @BotFather 2. Select your bot 3. Go to Bot Settings > Group Privacy > Turn OFF 4. Go to Bot Settings > Allow Groups > Turn ON Both steps are REQUIRED for left user tracking to work! ✓ migrate_limits_admins.php executed. Running migrate_seen_locks.php... === Seen/Reaction Locks Migration Started === Creating new tables (seen_reaction_locks, user_lock_progress)... ✓ Tables created/verified === Migration Completed Successfully === New features enabled: - Seen/Reaction lock system with timer - Sequential lock progression - Up to 10 locks per bot - User progress tracking Admin Panel Changes: - New button: '👁 قفل سین/ریاکشن' - Add seen or reaction locks - Set custom timer for each lock - View and remove locks - Locks shown in order User Experience: - After channel locks, users see seen/reaction locks - Each lock has custom message and timer - Must wait for timer before clicking 'انجام شد' - Locks shown sequentially (one by one) - Files sent after completing all locks To add locks: 1. Send /start to bot as admin 2. Click '👁 قفل سین/ریاکشن' 3. Click '➕ افزودن قفل' 4. Choose lock type (سین/ریاکشن) 5. Enter message text (can include links) 6. Enter timer in seconds Limits: - Maximum 10 locks per bot - Timer must be > 0 seconds - Locks execute in order ✓ migrate_seen_locks.php executed. Step 2: Setting webhook... Webhook URL: https://upload-7.ebot.top/webhook.php ✓ Webhook set successfully! Description: Webhook was set Step 3: Verifying webhook info... ✓ Webhook info retrieved: URL: https://upload-7.ebot.top/webhook.php Pending updates: 0 Allowed updates: message, callback_query, chat_member Last error date: None Last error message: None Step 4: Getting bot info... ✓ Bot info: Name: VIP MUSIC Username: @VipMusicRbot ID: 8478319814 Step 5: Configuration summary... Admin IDs: 1389610583, 7877016334 Debug mode: Enabled === Setup Complete! === Your bot is now ready to receive updates at: https://upload-7.ebot.top/webhook.php Next steps: 1. Make sure your webhook.php file is accessible at the URL above 2. Send /start to your bot to test it 3. Check the error.log and updates.log files for debugging 4. For security, delete or restrict access to this setup.php file after setup