Skip to content

Telegram Auto Forward Bot πŸ€– A Telegram bot that automatically forwards content from one channel to another with watermark support and full customization options.

License

Notifications You must be signed in to change notification settings

SudoR2spr/Telegram-Auto-Forward-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Deploy with Vercel

Telegram Auto Forward Bot πŸ€–

A Telegram bot that automatically forwards content from one channel to another with watermark support and full customization options.

πŸ“Œ Requirements

  • Node.js 16.x or higher
  • Git
  • Telegram Bot Token
  • Try Vercel/Render/Koyeb/Heroku/Zeet account (or any other hosting service)

πŸš€ Deployment Guide

1. Fork the Repository

  • Click the Fork button at the top right of this repository

2. Configuration Setup

Create a .env file with these variables:

BOT_TOKEN=your_bot_token_from_BotFather
SOURCE_CHANNEL_ID=your_source_channel_id
DESTINATION_CHANNEL_ID=your_destination_channel_id
ADMIN_ID=your_telegram_user_id
VERCEL_URL=your_App_name.vercel.app

Note

Replace your webhookUrl bot.js file line No 515

πŸ“Œ Telegram Bot Webhook Setup Guide

πŸ”— One-Click Webhook Setup

🌐 For Vercel/Heroku Users

  1. Vercel:
curl -X POST "https://api.telegram.org/botYOUR_BOT_TOKEN/setWebhook?url=https://YOUR_VERCEL_APP.vercel.app/webhook"

βœ… Verification Command

Check if webhook is set:

curl "https://api.telegram.org/botYOUR_BOT_TOKEN/getWebhookInfo"

πŸ”„ Switch Back to Polling

curl -X POST "https://api.telegram.org/botYOUR_BOT_TOKEN/deleteWebhook"
  1. Heroku:
    curl -X POST "https://api.telegram.org/botYOUR_BOT_TOKEN/setWebhook?url=https://YOUR_APP_NAME.herokuapp.com/webhook"
    

⚠️ Important Notes

  • Must use HTTPS (not HTTP)
  • URL must end with /webhook or your endpoint path
  • For security, always use a secret_token
  • Timeout: Webhook requests timeout after 60 seconds

✨ Key Features

πŸ”„ Auto-Forwarding Capabilities

- Automatic content forwarding between channels
- Supports multiple file types (videos, photos, documents, audio)
- Configurable forwarding rules and filters

πŸ› οΈ Customization Options

- Custom watermark text support
- Toggle auto-forwarding on/off
- Silent mode (disable notifications)
- File type filtering (forward only specific media types)

⚑ Admin Controls

- Manual post forwarding commands
- Bulk forward old posts (/forwardold)
- Real-time configuration changes
- Admin-only command protection

🌟 Advanced Functionality

- Persistent settings with cache
- Error handling and logging
- Webhook and polling support
- Multi-platform deployment

πŸ“Š Monitoring

- Last forwarded post tracking
- Bot status commands
- Activity logging

πŸš€ Deployment Options

- One-click Heroku deployment
- Vercel/Railway/Zeet support
- Local development ready
- Environment variable configuration

πŸ”’ Security

- Admin ID verification
- Markdown injection protection
- Error rate limiting

πŸ’‘ Bonus Features

- Interactive buttons for quick actions
- Help command with visual guide
- Multi-language support ready

πŸ“œ Command List

/start - Show bot status
/help - Show help guide
/forward - Manually forward last post
/forwardold [count] - Forward old posts
/autoforward [on/off] - Toggle auto-forwarding
/silent [on/off] - Toggle silent mode
/settypes [types] - Set file types to forward
/setwatermark [text] - Set watermark text
/togglewatermark - Toggle watermark on/off

🀝 Support

For help contact:
@Support_Username
Or visit our channel:
@Channel_Username

Feature Demo

About

Telegram Auto Forward Bot πŸ€– A Telegram bot that automatically forwards content from one channel to another with watermark support and full customization options.

Topics

Resources

License

Stars

Watchers

Forks