DEV Community

Discussion on: 9 Steps to Get 100 Stars on GitHub

Collapse
 
aahnik profile image
Aahnik Daw

GitHub logo aahnik / tgcf

A simple script to forward all the messages of one chat (private/group/channel) to another. Made using Telethon. Can be used to back up the contents of a chat to another place.

telegram-chat-forward

telegram-chat made-with-python MIT license

A simple script to forward all the messages of one chat (indivisual/group/channel) to another. Made using Telethon. Can be used to back up the contents of a chat to another place.

Signing in

First of all you need to have your Telegram account's api_id and api_hash Learn how to get them.

Installation

Make sure you have python 3.6 or above installed, by running python --version.

The following commands are to be executed on a Mac/Linux terminal like bash or zsh. If you are a Windows user, then I strongly recommend using pythonanywhere or termux, unless you are familiar with using command line on Windows.

Changes may be required to be made in the following commands to make them Windows compatible.

  • Clone this repo and move into it to get started.
git clone https://github.com/aahnik/telegram-chat-forward.git && cd telegram-chat-forward
Enter fullscreen mode Exit fullscreen mode
  • Install dependancies.
python3 -m venv venv && source venv/bin/activate
pip3
Enter fullscreen mode Exit fullscreen mode