Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/radinshayanfar/TGCopyBot
A python script to copy telegram messages to another chat (without forwarding)
https://github.com/radinshayanfar/TGCopyBot
docker python tdlib telegram telegram-api
Last synced: 4 days ago
JSON representation
A python script to copy telegram messages to another chat (without forwarding)
- Host: GitHub
- URL: https://github.com/radinshayanfar/TGCopyBot
- Owner: radinshayanfar
- Created: 2020-04-21T11:19:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-18T23:01:58.000Z (over 1 year ago)
- Last Synced: 2024-08-01T20:48:50.392Z (3 months ago)
- Topics: docker, python, tdlib, telegram, telegram-api
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 123
- Watchers: 5
- Forks: 72
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - radinshayanfar/TGCopyBot - A python script to copy telegram messages to another chat (without forwarding) (Python)
README
This bot does exactly what it is intented to do! If you want other features (e.g. editing messages, updating messages, etc), you have to customize it for yourself. Reading [python-telegram](http://python-telegram.readthedocs.io/) and [TDlib](https://core.telegram.org/tdlib/docs/) documentation may help you for doing so.
**PLEASE DON'T ASK FOR NEW FEATURES!**
# Telegram Copy Bot
## What it does
This bot copies (not forward) messages from a source channel (which doesn't have administrator privileges on it) to a destination chat (simple user, channel, etc.).## How to use
1. Copy `.env.example` to `.env`.
```
cp .env.example .env
```
2. Obtain `api_id` and `api_hash` from [this link](https://my.telegram.org/apps) and fill it inside `Telegram Configuration` section of the `.env` file alongside other configurations (such as phone number of your user, which acts as your bot).
3. Run the project via Docker and login to Telegram:
```
docker run -it \
--env-file=.env \
-v td-data:/tmp/.tdlib_files \
radinshayanfar/tgcopybot
```
4. After logging in, you will see your chat names and their chat id. Copy chat ids of source and destination chats and put them inside `App Configuration` section of the `.env` file.
5. Run the container in detached mode and it will do the job:
```
docker run -d \
--env-file=.env \
-v td-data:/tmp/.tdlib_files \
radinshayanfar/tgcopybot
```