Python program to automate custom telegram chat forwarding

Python program to automate custom telegram chat forwarding

ยท

3 min read

tgcf

The ultimate tool to automate telegram message forwarding.

You can forward messages from a source chat to a destination chat. You can configure tgcf to do exactly what you need.

Click on any link in this article to learn more about that particular thing.

The key features are:

  1. Two modes of operation are past or live for dealing with either existing or upcoming messages.
  2. Supports login with both telegram bot account as well as user account.
  3. Custom filter replace watermark ocr and whatever you need !
  4. Detailed docs ๐Ÿ“š + Video tutorial + Help from community in discussion forum ๐Ÿ˜Ž.
  5. If you are a python developer, writing plugins ๐Ÿ”Œ is like stealing candy from a baby.

What are you waiting for? Star ๐ŸŒŸ the repo and click Watch ๐Ÿ•ต to recieve updates.

Video Tutorial ๐Ÿ“บ

A youtube video is coming soon. Subscribe to get notified.

Run Locally ๐Ÿ”ฅ

Note: Make sure you have Python 3.8 or above installed. Go to python.org to download python.

Click on your platform of choice for a more detailed guide.

PlatformSupported
Windowsโœ…
Macโœ…
Linuxโœ…
Androidโœ…

If you are familiar with Docker, you may go that way for an easier life.

Open your terminal and run the following commands.

pip install --upgrade tgcf

To check if the installation succeeded, run

tgcf --version

If you see an error, that means installation failed.

Configuration ๐Ÿ› ๏ธ

Configuring tgcf is easy. You just need two files in your present directory (from which tgcf is invoked).

  • .env : To define your environment variables easily.

  • tgcf.config.yml : An yaml file to configure how tgcf behaves.

Start tgcf โœจ

In your terminal, just run tgcf live or tgcf past to start tgcf. It will prompt you to enter your phone no. or bot token, when you run it for the first time.

For more details run tgcf --help or read docs.

Run on Cloud ๐ŸŒฉ๏ธ

Deploying to a cloud server is an easier alternative if you cannot install on your own machine. Cloud servers are very reliable and great for running tgcf in live mode for a long time.

PlatformProsCons
Deploy to Herokufree for 450 hr/mocan't use tgcf in past mode
Deploy to DOspeed and reliabilitystarts from $5/mo
Run on Gitpodeasily edit config fileonly 50 hr/mo free

Other options

Getting Help ๐Ÿ’๐Ÿป

Contributing ๐Ÿ™

PRs most welcome! Read the contributing guidelines to get started.

Also read:

If you are not a developer, you may also contribute financially to incentivise the development of any custom feature you need.