Bot otomatis untuk memforward media (foto, video, dan GIF) dari channel Telegram ke grup/tujuan tertentu dengan AUTO-RECONNECT, SMART PAUSE SYSTEM, dan optimasi khusus untuk Termux/Android.
- โ Auto-Reconnect: Tidak pernah berhenti karena masalah jaringan
- โ Smart Pause System: Auto-pause saat memory penuh dengan interactive resume
- โ Perfect Anti-Duplicate: Per-message ID tracking yang tidak pernah duplicate
- โ Memory Monitoring: Real-time memory monitoring dengan auto-pause threshold
- โ Interactive Controls: Pause/resume/quit controls yang responsive
- โ Auto Log Management: Otomatis setup folder log baru saat ganti source channel
- โ Termux Optimized: Dioptimasi khusus untuk Android/Termux environment
- โ FloodWait Handling: Handle rate limiting Telegram dengan sempurna
- โ Real-time Monitoring: Forward otomatis saat ada media baru
- โ Batch Processing: Scan semua pesan lama atau sejumlah tertentu
- โ Connection Monitor: Monitor koneksi real-time setiap 20 detik
- โ Graceful Shutdown: Berhenti dengan aman menggunakan Ctrl+C
- โ Helper Scripts: setup_channel.py untuk easy channel switching
- โธ๏ธ Smart Pause System: Auto-pause saat memory penuh dengan interactive resume controls
- ๐ Perfect Anti-Duplicate: Per-message ID tracking yang tidak pernah duplicate meskipun restart
- ๐ Auto Log Management: Otomatis backup log lama dan setup folder log baru saat ganti source channel
- ๐ง Memory Monitoring: Real-time memory monitoring dengan threshold auto-pause (< 100MB atau > 90% usage)
- ๐ฎ Interactive Controls: Pause/resume/quit controls dengan pilihan c/q/m yang responsive
- ๐พ Smart ID Management: Improved ID tracking dan file handling dengan UTF-8 encoding
- ๐ Better Progress Display: Progress tracking dengan memory status real-time setiap 25 pesan
- ๐ ๏ธ Helper Scripts: setup_channel.py untuk easy channel switching dan auto-backup
- ๐ Batch Optimization: Smaller batch size (25) untuk optimal Termux performance
- ๐ฑ Enhanced Mobile Support: Better resource management untuk Android/Termux environment
git clone https://github.com/NgrhDn/Project-Forward-Bot.git
cd Project-Forward-Bot
# Jalankan setup otomatis (sekali saja)
chmod +x setup_termux.sh
./setup_termux.sh# Gunakan helper script (recommended)
python setup_channel.py
# Atau manual edit main.py# Simple (Recommended)
python main.py
# Dengan Auto-Restart
chmod +x run_termux.sh
./run_termux.shgit clone https://github.com/NgrhDn/Project-Forward-Bot.git
cd Project-Forward-Bot
pip install -r requirements.txt# Setup channel dengan helper script
python setup_channel.py# Simple
python main.py
# Dengan Auto-Restart
python run_bot.py
# Atau double-click
start_bot.batgit clone https://github.com/NgrhDn/Project-Forward-Bot.git
cd Project-Forward-Bot
pip install -r requirements.txt
python setup_channel.py # Setup channel
python main.py # Jalankan bot- Kunjungi my.telegram.org
- Login dengan nomor Telegram
- Buat aplikasi baru
- Salin
api_iddanapi_hash
# Jalankan helper script
python setup_channel.py
# Script akan meminta:
# - Source channel ID (channel sumber)
# - Target channel ID (grup/channel tujuan)
#
# Dan otomatis:
# โ
Backup log lama ke logs_backup/
# โ
Buat folder log baru
# โ
Update konfigurasi main.py
# โ
Ready to run!Edit main.py secara manual:
# === Konfigurasi API ===
api_id = 12345678 # Your API ID
api_hash = 'your_api_hash_here'
# === ID Channel dan Grup ===
source_channel = -1001234567890 # Channel sumber
target_channel = -1009876543210 # Grup/channel tujuan- Scan Semua: Scan semua pesan dari awal channel
- Scan Terbatas: Scan sejumlah pesan terakhir (contoh: 1000)
- Real-time Only: Langsung ke mode real-time tanpa scan
Bot dilengkapi dengan sistem kontrol interaktif:
Saat Memory Penuh:
โธ๏ธ BOT DIJEDA: Memory penuh - 45MB tersisa (95.2% used)
๐ง Silakan bersihkan memory/storage atau perbaiki masalah
โก Ketik 'c' + Enter untuk melanjutkan setelah masalah diperbaiki
๐ก Pilihan:
c = Continue (lanjutkan setelah bersihkan memory)
q = Quit (keluar dari bot)
m = Check memory status
Pilihan (c/q/m): _
Controls Available:
- c = Continue (lanjutkan setelah pause)
- q = Quit (keluar dari bot)
- m = Memory check (cek status memory)
- Ctrl+C = Graceful shutdown
# Gunakan helper script (SANGAT MUDAH!)
python setup_channel.py
# Otomatis:
# 1. Input channel ID baru
# 2. Backup log lama ke logs_backup/
# 3. Buat folder log baru
# 4. Update main.py
# 5. Siap dijalankan!๐ Progress: 25/1000 | Memory OK: 150MB tersisa (75.2% used)
[25 dari 1000] โ
Dikirim (ID: 12345) ๐ฅ Scan
๐ Delay 20 detik untuk keamanan (per 25 pesan)...
-
Disable Battery Optimization:
- Settings โ Apps โ Termux โ Battery โ Don't optimize
-
Keep Termux Active:
- Jangan minimize terlalu lama
- Pin Termux di recent apps
-
Network Stability:
- Gunakan WiFi stabil
- Hindari mobile data yang tidak stabil
-
Memory Management:
- Bot otomatis pause saat memory < 100MB
- Bersihkan storage secara berkala
- Tutup aplikasi lain yang tidak perlu
-
Permissions & Setup:
# Install Termux API untuk wake lock pkg install termux-api # Grant storage permission termux-setup-storage # Install psutil untuk memory monitoring pip install psutil
โธ๏ธ BOT DIJEDA: Memory penuh - 50MB tersisa (92.1% used)
๐ง Silakan bersihkan memory/storage atau perbaiki masalah
โ
SOLUSI:
1. Bersihkan storage/memory HP
2. Tutup aplikasi lain yang tidak perlu
3. Hapus file tidak perlu
4. Ketik 'c' untuk melanjutkan
โ ConnectionError: Connection to Telegram failed
โ
SOLUSI: Bot akan auto-reconnect, tunggu saja
โ FloodWaitError: Too many requests
โ
SOLUSI: Bot akan otomatis pause dan resume setelah delay
โป๏ธ Lewat (ID: 12347) Sudah pernah dikirim
โ
SOLUSI: Bot otomatis skip pesan yang sudah dikirim (Perfect!)
chmod +x *.shpip install -r requirements.txt --upgradelogs/
โโโ {source_channel_id}/
โ โโโ forwarded_ids.txt # ID pesan yang sudah dikirim
โ โโโ failed_ids.txt # ID pesan yang gagal
โ โโโ log.txt # Log aktivitas lengkap
โโโ logs_backup/ # Backup otomatis log lama
โโโ {old_channel}_{timestamp}/
โ
Dikirim (ID: 12345) ๐ฅ Realtime
โ Gagal kirim ID 12346
โป๏ธ Lewat (ID: 12347) Sudah pernah dikirim
๐ Retry batch 10 media gagal...
๐ก Koneksi pulih!
๐ Progress: 25/1000 | Memory OK: 150MB tersisa (75.2% used)
โธ๏ธ BOT DIJEDA: Memory penuh - bersihkan storage
๐พ Saved forwarded ID: 12348
๐๏ธ Removed from failed list: 12349
๐ Memory OK: 250MB tersisa (65.5% used)
๐ Memory rendah: 80MB tersisa (92.1% used)
โธ๏ธ BOT DIJEDA: Memory penuh - 45MB tersisa (95.2% used)
# Edit di check_memory_usage() function
if available_mb < 100 or used_percent > 90: # Threshold default
return False, "Memory rendah"
# Bisa diubah sesuai kebutuhan:
# available_mb < 200 # Untuk threshold 200MB
# used_percent > 85 # Untuk threshold 85%# Edit di berbagai bagian kode
retry_batch = list(failed_ids)[:25] # Default: 25 untuk Termux
# Bisa diubah ke 50 untuk PC yang lebih powerful
# Memory check interval
if count % 25 == 0: # Default: setiap 25 pesan
# Bisa diubah ke 50 atau 100 untuk device powerful- Log otomatis terpisah per channel ID
- Backup otomatis saat ganti channel dengan timestamp
- Struktur:
logs/{channel_id}/danlogs_backup/{old_channel}_{timestamp}/ - Helper script
setup_channel.pyuntuk easy switching
- Python 3.7+
- 100MB free storage minimum (untuk log dan cache)
- 512MB RAM minimum (1GB recommended)
- Internet connection (WiFi recommended untuk Termux)
telethon==1.40.0
psutil>=5.8.0 (untuk memory monitoring)
termux-api (untuk wake lock)
Script untuk mengganti source channel dengan mudah:
python setup_channel.py
# Fitur:
โ
Input channel ID baru dengan validasi
โ
Backup log lama otomatis ke logs_backup/
โ
Buat folder log baru dengan struktur lengkap
โ
Update konfigurasi main.py otomatis
โ
Backup main.py sebelum edit
โ
Setup lengkap untuk channel baru
โ
Ready to run langsung setelah setupBot secara otomatis:
- Monitor memory setiap 25 pesan
- Pause saat memory < 100MB atau usage > 90%
- Berikan kontrol interaktif untuk resume
- Log status memory di setiap progress update
- Cross-platform: psutil + /proc/meminfo fallback
# Termux
./run_termux.sh # Advanced dengan monitoring
nohup ./run_termux.sh & # Background mode
# Windows
start_bot.bat # Batch file auto-restart
python run_bot.py # Python auto-restart
# Linux
python run_bot.py # Python auto-restartKontribusi sangat diterima! Silakan:
- Fork repository
- Buat feature branch (
git checkout -b feature/AmazingFeature) - Commit perubahan (
git commit -m 'Add AmazingFeature') - Push ke branch (
git push origin feature/AmazingFeature) - Buka Pull Request
Areas yang membutuhkan kontribusi:
- Multi-language support
- GUI interface
- Database integration
- Advanced filtering options
- Performance optimizations
Distributed under the MIT License. See LICENSE for more information.
- Telethon - MTProto API client
- Termux - Android terminal emulator
- psutil - System and process utilities
- Komunitas Telegram Bot Indonesia
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Telegram: @YourTelegramUsername
- โธ๏ธ Smart Pause System: Auto-pause saat memory penuh dengan interactive resume
- ๐ Perfect Anti-Duplicate: Per-message ID tracking yang tidak pernah duplicate
- ๐ Auto Log Management: Otomatis setup folder log baru saat ganti source channel
- ๐ง Memory Monitoring: Real-time memory monitoring dengan threshold auto-pause
- ๐ฎ Interactive Controls: Pause/resume/quit controls yang responsive
- ๐พ Smart ID Management: Improved ID tracking dan file handling
- ๐ Better Progress Display: Progress dengan memory status real-time
- ๐ ๏ธ Helper Scripts: setup_channel.py untuk easy channel switching
- ๐ Batch Optimization: Smaller batch size (25) untuk Termux performance
- โจ AUTO-RECONNECT: Never stops due to network issues
- ๐ก๏ธ Error Recovery: Automatic recovery from all network errors
- ๐ฑ Termux Optimization: Full Android/Termux support
- โก Performance: Faster processing with smart delays
- ๐ Wake Lock: Prevent Android from killing the process
- ๐ Better Logging: Comprehensive logging system
- ๐ฏ Smart Retry: Progressive delays for retry attempts
- ๐ Initial release
- โ Basic forwarding functionality
- ๐ Log system per channel
- ๐ Retry mechanism for failed messages
โญ Jika project ini membantu, berikan star di GitHub!
๐ Ready to use dengan confidence - Bot yang tidak pernah berhenti!